File: nas.init

package info (click to toggle)
nas 1.9.4-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 8,140 kB
  • sloc: ansic: 52,109; makefile: 31,375; sh: 8,077; perl: 1,104; yacc: 249; cpp: 216; lex: 68
file content (38 lines) | stat: -rw-r--r-- 1,006 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#! /bin/sh
### BEGIN INIT INFO
# Provides:          nasd
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: start or stop the Network Audio System.
### END INIT INFO

test -f /usr/bin/nasd || exit 0

if test -f /etc/default/nas; then
    . /etc/default/nas
fi

case "$1" in
  start)
    echo Starting the Network Audio System
    start-stop-daemon --start --quiet --startas /usr/bin/start-nas \
						--exec /usr/bin/nasd -- $NASD_OPTS
    ;;
  stop)
    echo Stopping the Network Audio System
    start-stop-daemon --stop --quiet --exec /usr/bin/nasd
    ;;
  restart|force-reload)
    echo Restarting the Network Audio System
    start-stop-daemon --stop --quiet --exec /usr/bin/nasd
    start-stop-daemon --start --quiet --startas /usr/bin/start-nas \
						--exec /usr/bin/nasd -- $NASD_OPTS
    ;;
  *)
    echo "Usage: /etc/init.d/nas {start|stop|restart|force-reload}"
    exit 1
esac

exit 0