Magellan Linux

Annotation of /trunk/nas/nas.rc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 59 - (hide annotations) (download)
Sat Feb 18 22:47:26 2006 UTC (18 years, 8 months ago) by niro
File size: 1012 byte(s)
new files

1 niro 58 #!/bin/bash
2 niro 59 # $Header: /root/magellan-cvs/src/nas/nas.rc,v 1.2 2006-02-18 22:47:26 niro Exp $
3 niro 58
4     #%rlevels: 3:s 4:s 5:s 0:k 1:k 2:k 6:k
5     #%start: 80
6     #%stop: 20
7    
8     #deps
9     #%needs:
10     #%before:
11     #%after:
12    
13     source /etc/sysconfig/rc
14     source $rc_functions
15    
16     # source nas options
17     [ -f /etc/conf.d/nas ] && . /etc/conf.d/nas
18    
19     case "$1" in
20     start)
21     echo -e ${COLOREDSTAR}"Starting Network Audio System daemon ..."
22     start-stop-daemon --start --quiet --exec /usr/X11R6/bin/nasd --background \
23     --pidfile /var/run/nasd.pid --make-pidfile -- ${NAS_OPTIONS}
24     evaluate_retval
25    
26     update_svcstatus $1
27     splash svc_started "$(basename $0)" 0
28     ;;
29    
30     stop)
31     echo -e ${COLOREDSTAR}"Stopping Network Audio System daemon ..."
32     start-stop-daemon --stop --quiet --pidfile /var/run/nasd.pid
33     evaluate_retval
34    
35     update_svcstatus $1
36     splash svc_stopped "$(basename $0)" 0
37     ;;
38    
39     restart)
40     $0 stop
41     sleep 1
42     $0 start
43     ;;
44    
45     status)
46     statusproc /usr/X11R6/bin/nasd
47     ;;
48    
49     *)
50     echo "Usage: $0 {start|stop|restart|status}"
51     exit 1
52     ;;
53     esac