~ubuntu-branches/ubuntu/dapper/gsmlib/dapper

« back to all changes in this revision

Viewing changes to debian/gsm-utils.init

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese
  • Date: 2006-05-02 23:21:14 UTC
  • Revision ID: james.westby@ubuntu.com-20060502232114-ipjho13kae52wv2n
Tags: 1.10-9ubuntu1
* Fix up init script. Thanks to Mitja Pagon (Closes Malone: #30228)
  - Also fixed reload to stop daemon before restarting

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
PRIORITIES=3
20
20
STARTOPTS=""
21
21
SMSUSER="gsmsms:gsmsms"
22
 
test -r /etc/default/gsm-utils && . /etc/default/gsm-utils  # for overwriting some parameters
 
22
 
 
23
if [ -r /etc/default/gsm-utils ]
 
24
then 
 
25
        . /etc/default/gsm-utils
 
26
fi  # for overwriting some parameters
23
27
 
24
28
OPTIONS="-d $PHONEDEV -b $BAUDRATE -L -P $PRIORITIES"
25
29
OPTIONS="$OPTIONS -s $SPOOLDIR/queue -S $SPOOLDIR/sent -F $SPOOLDIR/failed"
26
30
test -n "$SMSPROCESSOR" && OPTIONS="$OPTIONS -a $SMSPROCESSOR"
27
31
test -n "$SMSUSER" && STARTOPTS="$STARTOPTS --chuid $SMSUSER"
28
 
test -r /etc/default/gsm-utils && . /etc/default/gsm-utils  # for overwriting OPTIONS
 
32
 
 
33
if [ -r /etc/default/gsm-utils ]
 
34
then
 
35
         . /etc/default/gsm-utils
 
36
fi  # for overwriting OPTIONS
29
37
 
30
38
case "$1" in
31
39
  start)
55
63
        ;;
56
64
  restart|force-reload)
57
65
        echo -n "Restarting $DESC: $NAME"
58
 
        start-stop-daemon --start --quiet --pidfile /var/run/gsm-utils/$NAME.pid \
 
66
        start-stop-daemon --stop --quiet --pidfile /var/run/gsm-utils/$NAME.pid \
59
67
                --make-pidfile --background $STARTOPTS --exec $DAEMON -- $OPTIONS
60
68
        sleep 5
61
69
        start-stop-daemon --start --quiet --pidfile /var/run/gsm-utils/$NAME.pid \