# HG changeset patch # User godisch # Date 1046540438 0 # Node ID 08222dbe6eb0c4e6a2035660f35d4e243c026ea1 # Parent 47ba9cbc7b751616aec2630c067a1dd164a55f03 [svn] cleanup diff -r 47ba9cbc7b75 -r 08222dbe6eb0 debian/cron.d --- a/debian/cron.d Sat Mar 01 17:39:39 2003 +0000 +++ b/debian/cron.d Sat Mar 01 17:40:38 2003 +0000 @@ -2,4 +2,4 @@ # # fetch requested articles periodically -9,39 * * * * news [ -x /usr/sbin/noffle-cronfetch ] && /usr/sbin/noffle-cronfetch +9,39 * * * * news [ -x /usr/sbin/noffle-cronfetch ] && /usr/sbin/noffle-cronfetch || : diff -r 47ba9cbc7b75 -r 08222dbe6eb0 debian/cron.daily --- a/debian/cron.daily Sat Mar 01 17:39:39 2003 +0000 +++ b/debian/cron.daily Sat Mar 01 17:40:38 2003 +0000 @@ -1,5 +1,11 @@ -#!/bin/sh -e +#!/bin/sh # # expire old articles, output will be logged to syslog -[ -x /usr/bin/noffle ] && /usr/bin/noffle --expire > /dev/null 2>&1 +set -e + +if [ -x /usr/bin/noffle ]; then + /usr/bin/noffle --expire > /dev/null 2>&1 +fi + +exit 0 diff -r 47ba9cbc7b75 -r 08222dbe6eb0 debian/init --- a/debian/init Sat Mar 01 17:39:39 2003 +0000 +++ b/debian/init Sat Mar 01 17:40:38 2003 +0000 @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: init 437 2003-02-16 08:47:33Z godisch $ +# $Id: init 470 2003-03-01 17:40:38Z godisch $ PATH=/bin:/usr/bin:/sbin:/usr/sbin @@ -9,7 +9,9 @@ else NOFFLE_FETCHMODE="cron" fi -[ -f /etc/default/noffle ] && . /etc/default/noffle +if [ -f /etc/default/noffle ]; then + . /etc/default/noffle +fi [ -x "$NOFFLE" ] || exit 0 @@ -20,8 +22,11 @@ ;; start) echo "Initializing offline news server: noffle." - [ "$NOFFLE_FETCHMODE" = ppp ] && $NOFFLE --offline - [ "$NOFFLE_FETCHMODE" = cron ] && $NOFFLE --online + if [ "$NOFFLE_FETCHMODE" = ppp ]; then + $NOFFLE --offline;; + else + $NOFFLE --online;; + fi ;; stop) $0 offline diff -r 47ba9cbc7b75 -r 08222dbe6eb0 debian/ip-down --- a/debian/ip-down Sat Mar 01 17:39:39 2003 +0000 +++ b/debian/ip-down Sat Mar 01 17:40:38 2003 +0000 @@ -1,7 +1,16 @@ #!/bin/sh +set -e + # 'ppp' should be a sane default here NOFFLE_FETCHMODE=ppp -[ -f /etc/default/noffle ] && . /etc/default/noffle + +if [ -f /etc/default/noffle ]; then + . /etc/default/noffle +fi -[ -x /usr/bin/noffle -a "$NOFFLE_FETCHMODE" = ppp ] && /usr/bin/noffle --offline +if [ -x /usr/bin/noffle -a "$NOFFLE_FETCHMODE" = ppp ]; then + /usr/bin/noffle --offline +fi + +exit 0 diff -r 47ba9cbc7b75 -r 08222dbe6eb0 debian/ip-up --- a/debian/ip-up Sat Mar 01 17:39:39 2003 +0000 +++ b/debian/ip-up Sat Mar 01 17:40:38 2003 +0000 @@ -1,7 +1,16 @@ #!/bin/sh +set -e + # 'ppp' should be a sane default here NOFFLE_FETCHMODE=ppp -[ -f /etc/default/noffle ] && . /etc/default/noffle + +if [ -f /etc/default/noffle ]; then + . /etc/default/noffle +fi -[ -x /usr/bin/noffle -a "$NOFFLE_FETCHMODE" = ppp ] && (/usr/bin/noffle --online; nohup /usr/bin/noffle --fetch) & +if [ -x /usr/bin/noffle -a "$NOFFLE_FETCHMODE" = ppp ]; then + (/usr/bin/noffle --online; nohup /usr/bin/noffle --fetch) & +fi + +exit 0