comparison debian/init @ 334:08222dbe6eb0 noffle

[svn] cleanup
author godisch
date Sat, 01 Mar 2003 17:40:38 +0000
parents 399ccb5e641b
children 1aa1ed030464
comparison
equal deleted inserted replaced
333:47ba9cbc7b75 334:08222dbe6eb0
1 #!/bin/sh 1 #!/bin/sh
2 # $Id: init 437 2003-02-16 08:47:33Z godisch $ 2 # $Id: init 470 2003-03-01 17:40:38Z godisch $
3 3
4 PATH=/bin:/usr/bin:/sbin:/usr/sbin 4 PATH=/bin:/usr/bin:/sbin:/usr/sbin
5 5
6 NOFFLE=/usr/bin/noffle 6 NOFFLE=/usr/bin/noffle
7 if [ -x /usr/sbin/pppd ]; then 7 if [ -x /usr/sbin/pppd ]; then
8 NOFFLE_FETCHMODE="ppp" 8 NOFFLE_FETCHMODE="ppp"
9 else 9 else
10 NOFFLE_FETCHMODE="cron" 10 NOFFLE_FETCHMODE="cron"
11 fi 11 fi
12 [ -f /etc/default/noffle ] && . /etc/default/noffle 12 if [ -f /etc/default/noffle ]; then
13 . /etc/default/noffle
14 fi
13 15
14 [ -x "$NOFFLE" ] || exit 0 16 [ -x "$NOFFLE" ] || exit 0
15 17
16 case "$1" in 18 case "$1" in
17 online|offline) 19 online|offline)
18 echo "Switching offline news server to $1 mode: noffle." 20 echo "Switching offline news server to $1 mode: noffle."
19 $NOFFLE --$1 21 $NOFFLE --$1
20 ;; 22 ;;
21 start) 23 start)
22 echo "Initializing offline news server: noffle." 24 echo "Initializing offline news server: noffle."
23 [ "$NOFFLE_FETCHMODE" = ppp ] && $NOFFLE --offline 25 if [ "$NOFFLE_FETCHMODE" = ppp ]; then
24 [ "$NOFFLE_FETCHMODE" = cron ] && $NOFFLE --online 26 $NOFFLE --offline;;
27 else
28 $NOFFLE --online;;
29 fi
25 ;; 30 ;;
26 stop) 31 stop)
27 $0 offline 32 $0 offline
28 ;; 33 ;;
29 restart|force-reload) 34 restart|force-reload)