Mercurial > noffle
comparison debian/init @ 371:82457f16cf43 noffle
[svn] fixed policy compliance
author | godisch |
---|---|
date | Wed, 02 Apr 2003 12:05:33 +0100 |
parents | 8f8db12ae359 |
children | 62b17f6d0269 |
comparison
equal
deleted
inserted
replaced
370:900495138de9 | 371:82457f16cf43 |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 # $Id: init 477 2003-03-04 22:16:42Z godisch $ | 2 # $Id: init 511 2003-04-02 11:05:33Z godisch $ |
3 | 3 |
4 PATH=/bin:/usr/bin:/sbin:/usr/sbin | 4 set -e |
5 NOFFLE=/usr/bin/noffle | |
6 [ -x "$NOFFLE" ] || exit 0 | |
5 | 7 |
6 NOFFLE=/usr/bin/noffle | |
7 if [ -x /usr/sbin/pppd ]; then | 8 if [ -x /usr/sbin/pppd ]; then |
8 NOFFLE_FETCHMODE="ppp" | 9 NOFFLE_FETCHMODE="ppp" |
9 else | 10 else |
10 NOFFLE_FETCHMODE="cron" | 11 NOFFLE_FETCHMODE="cron" |
11 fi | 12 fi |
12 [ -f /etc/default/noffle ] && . /etc/default/noffle || : | 13 if [ -f /etc/default/noffle ]; then |
13 | 14 . /etc/default/noffle |
14 [ -x "$NOFFLE" ] || exit 0 | 15 fi |
15 | 16 |
16 case "$1" in | 17 case "$1" in |
17 online|offline) | 18 online|offline) |
18 echo "Switching offline news server to $1 mode: noffle." | 19 echo "Switching offline news server to $1 mode: noffle." |
19 $NOFFLE --$1 | 20 $NOFFLE --$1 |
27 fi | 28 fi |
28 ;; | 29 ;; |
29 stop) | 30 stop) |
30 $0 offline | 31 $0 offline |
31 ;; | 32 ;; |
32 restart|force-reload) | 33 reload|force-reload|restart) |
33 $0 start | |
34 ;; | 34 ;; |
35 *) | 35 *) |
36 echo "Usage: $0 {start|stop}" >&2 | 36 echo "Usage: $0 {start|stop|online|offline}" >&2 |
37 exit 1 | 37 exit 1 |
38 ;; | 38 ;; |
39 esac | 39 esac |
40 | 40 |
41 exit 0 | 41 exit 0 |