changeset 334:08222dbe6eb0 noffle

[svn] cleanup
author godisch
date Sat, 01 Mar 2003 17:40:38 +0000
parents 47ba9cbc7b75
children 2939f2e13748
files debian/cron.d debian/cron.daily debian/init debian/ip-down debian/ip-up
diffstat 5 files changed, 40 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- 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 || :
--- 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
--- 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
--- 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
--- 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