SOURCES: webalizer.cron, webalizer.sysconfig - FORCE_USER option b...
blues
blues at pld-linux.org
Fri Jun 8 15:35:53 CEST 2007
Author: blues Date: Fri Jun 8 13:35:53 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- FORCE_USER option by Przemyslaw Sztoch
---- Files affected:
SOURCES:
webalizer.cron (1.8 -> 1.9) , webalizer.sysconfig (1.6 -> 1.7)
---- Diffs:
================================================================
Index: SOURCES/webalizer.cron
diff -u SOURCES/webalizer.cron:1.8 SOURCES/webalizer.cron:1.9
--- SOURCES/webalizer.cron:1.8 Tue Jan 17 23:19:10 2006
+++ SOURCES/webalizer.cron Fri Jun 8 15:35:48 2007
@@ -4,6 +4,13 @@
[ -f /etc/sysconfig/webalizer ] && . /etc/sysconfig/webalizer
umask 0022
+if [ -n "$FORCE_USER" ]; then
+ if [ "$FORCE_USER" != "`id -un`" ]; then
+ echo "Wrong current user. $FORCE_USER is required!"
+ exit 1
+ fi
+fi
+
if [ -n "$ENABLE" ] && [ "$ENABLE" = "yes" -o "$ENABLE" = "YES" ]; then
LC_ALL=$LANG
export LANG
@@ -16,11 +23,11 @@
fi
if [ -f /etc/webalizer.conf ]; then
- webalizer ${WEBALIZER_OPTS} -c /etc/webalizer.conf
+ webalizer ${WEBALIZER_OPTS} -c /etc/webalizer.conf || echo "webalizer -c /etc/webalizer.conf - unsuccesful!"
fi
if [ -n "$MULTIPLE" ] && [ "$MULTIPLE" = "yes" -o "$MULTIPLE" = "YES" ]; then
for i in $(ls /etc/webalizer/*.conf 2>/dev/null); do
- webalizer ${WEBALIZER_OPTS} -c $i;
+ webalizer ${WEBALIZER_OPTS} -c $i || echo "webalizer -c $i - unsuccesful!"
done
fi
fi
================================================================
Index: SOURCES/webalizer.sysconfig
diff -u SOURCES/webalizer.sysconfig:1.6 SOURCES/webalizer.sysconfig:1.7
--- SOURCES/webalizer.sysconfig:1.6 Tue Jan 17 23:17:28 2006
+++ SOURCES/webalizer.sysconfig Fri Jun 8 15:35:48 2007
@@ -14,3 +14,6 @@
# Don't display any messages
#REALLY_QUIET="yes"
+
+# Force checking if webalizer is done with proper user rights
+FORCE_USER="stats"
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/webalizer.cron?r1=1.8&r2=1.9&f=u
http://cvs.pld-linux.org/SOURCES/webalizer.sysconfig?r1=1.6&r2=1.7&f=u
More information about the pld-cvs-commit
mailing list