~upstart-devel/upstart/upstart-jobs

« back to all changes in this revision

Viewing changes to utopic/etc/init.d/aprsd

  • Committer: Dimitri John Ledkov
  • Date: 2014-11-19 12:58:41 UTC
  • Revision ID: dimitri.j.ledkov@intel.com-20141119125841-98dr37roy8dvcv3b
auto update

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
### BEGIN INIT INFO
3
 
# Provides:          aprsd
4
 
# Required-Start:    $remote_fs $syslog
5
 
# Required-Stop:     $remote_fs $syslog
6
 
# Default-Start:     2 3 4 5
7
 
# Default-Stop:      0 1 6
8
 
# Short-Description: Start aprsd daemon.
9
 
### END INIT INFO
10
 
 
11
 
PATH=/bin:/usr/bin:/sbin:/usr/sbin
12
 
DAEMON=/usr/sbin/aprsd
13
 
NAME=aprsd
14
 
 
15
 
test -f $DAEMON || exit 0
16
 
 
17
 
case "$1" in
18
 
 
19
 
  start)
20
 
    update-inetd --disable ftp
21
 
    echo -n "Starting APRS gateway: "
22
 
    start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid --exec $DAEMON -- -d
23
 
    echo "$NAME."
24
 
    ;;
25
 
 
26
 
  stop)
27
 
    echo -n "Stopping APRS gateway: "
28
 
    start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/$NAME.pid --exec $DAEMON
29
 
    echo "$NAME."
30
 
    ;;
31
 
 
32
 
  force-reload|restart)
33
 
    $0 stop
34
 
    $0 start
35
 
    ;;
36
 
 
37
 
  *)
38
 
    echo "Usage: /etc/init.d/$NAME {start|stop|restart}"
39
 
    exit 1
40
 
    ;;
41
 
 
42
 
esac
43
 
 
44
 
exit 0