updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / netams / rc.patch
blobd84cf1c0472392c6f9fccb0b0e3f81084e64fd4a
1 --- netams-linux-startup.sh.old 2009-08-03 13:56:08.000000000 +0400
2 +++ netams-linux-startup.sh 2009-08-03 13:56:59.000000000 +0400
3 @@ -9,33 +9,29 @@
4 # V.N. Chernenko <vnc@vnc.org.ua>
6 # Source function library.
7 -. /etc/init.d/functions
8 +. /etc/rc.d/functions
10 -/usr/sbin=/usr/sbin
11 CONFIG=/etc/netams.conf
12 PID_FILE=/var/run/netams.pid
14 -RETVAL=0
16 +daemon_name=netams
18 start() {
19 - echo -n "Starting Netams services:"
20 if [ ! -f $PID_FILE ]; then
21 - daemon $/usr/sbin/netams -lf $CONFIG
22 - RETVAL=$?
23 - echo
24 + stat_busy "Starting $daemon_name daemon"
25 + /usr/sbin/netams -lf $CONFIG
26 + add_daemon $daemon_name
27 + stat_done
28 else
29 - RETVAL=1
30 echo -e '\t\t\t\t[ \033[0;31mIt is loaded\033[0;0m ]'
31 + stat_fail
32 + exit 1
34 - return $RETVAL
36 stop() {
37 - echo -n "Stopping Netams services:"
38 + stat_busy "Stopping $daemon_name daemon"
39 killproc netams
40 - RETVAL=$?
41 - echo
42 - return $RETVAL
43 + rm_daemon $daemon_name
44 + stat_done
47 case "$1" in
48 @@ -48,7 +44,6 @@
49 restart)
50 stop
51 start
52 - RETVAL=$?
55 echo $"Usage: $0 {start|stop|restart}"
56 @@ -56,4 +51,4 @@
58 esac
60 -exit $RETVAL
61 +exit 0