--- /root/.emacs.d/backups/!etc!init.d!ntop.~1~ 2012-01-20 13:21:49.984402027 +0100 +++ /etc/init.d/ntop 2012-04-02 15:45:41.169536294 +0200 @@ -7,7 +7,11 @@ } checkconfig() { - if [ ! -e /var/lib/ntop/ntop_pw.db ]; then + if [ ! -d $NTOP_DATA_DIR ]; then + mkdir -p $NTOP_DATA_DIR + chown ntop.root $NTOP_DATA_DIR + fi + if [ ! -e $NTOP_DATA_DIR/ntop_pw.db ]; then eerror "You need to set a password first by running" eerror "ntop --set-admin-password" return 1 @@ -19,7 +23,7 @@ ebegin "Starting ntop" export LC_ALL=C # apparently doesn't work with some locales (#191576 and #205382) export GDFONTPATH=/usr/share/fonts/corefonts # apparently the only font that works (#231705) - start-stop-daemon --start --exec /usr/bin/ntop -- -d -L ${NTOP_OPTS} + start-stop-daemon --start --exec /usr/bin/ntop -- -d -L -u ntop -P $NTOP_DATA_DIR ${NTOP_OPTS} eend $? } --- /root/.emacs.d/backups/!etc!conf.d!ntop.~1~ 2012-01-20 13:21:50.034402030 +0100 +++ /etc/conf.d/ntop 2012-04-02 15:45:28.468535104 +0200 @@ -1,9 +1,11 @@ # Config file for /etc/init.d/ntop +NTOP_DATA_DIR=/var/lib/ntop + # Set preferred options here #NTOP_OPTS="--http-server 3000 --https-server 0 --interface eth0" # suggestions from bug #136983 (use it in case you experience ntop hangs) -#NTOP_OPTS="u ntop -P /var/lib/ntop --disable-schedyield --http-server 3000 --https-server 3001" +#NTOP_OPTS="--disable-schedyield --http-server 3000 --https-server 3001" -NTOP_OPTS="-u ntop -P /var/lib/ntop" +NTOP_OPTS=""