forked from pttlink/Asterisk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdatenodelist
executable file
·46 lines (41 loc) · 955 Bytes
/
updatenodelist
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
39
40
41
42
43
44
45
46
#! /bin/sh
### BEGIN INIT INFO
# Provides: updatenodelist
# Required-Start: $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 2 3 4 5
# Short-Description: Run /usr/local/bin/rc.updatenodelist if it exist
### END INIT INFO
PATH=/sbin:/usr/sbin:/bin:/usr/bin
. /lib/init/vars.sh
. /lib/lsb/init-functions
do_start() {
if [ -x /usr/local/bin/rc.updatenodelist ]; then
[ "$VERBOSE" != no ] && log_begin_msg "Running ASL Node List Updater"
/usr/local/bin/rc.updatenodelist &
ES=$?
[ "$VERBOSE" != no ] && log_end_msg $ES
return $ES
fi
}
case "$1" in
start)
do_start
;;
reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
killall -9 rc.updatenodelist
;;
restart)
killall -9 rc.updatenodelist
do_start
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac