2 PATH
=/usr
/sbin
:/usr
/bin
:/sbin
:/bin
3 DESC
="Autoscan network"
4 DAEMON
=/usr
/sbin
/autoscan-network-daemon
6 daemon_name
=autoscan-network
10 .
/etc
/conf.d
/$daemon_name.conf
13 pidof
-o %PPID
$daemon_name
18 stat_busy
"Starting $daemon_name daemon"
21 if [ -z "$PID" ]; then
22 [ -f /var
/run
/$daemon_name.pid
] && rm -f /var
/run
/$daemon_name.pid
30 echo $
(get_pid
) > /var
/run
/$daemon_name.pid
31 add_daemon
$daemon_name
41 stat_busy
"Stopping $daemon_name daemon"
44 [ ! -z "$PID" ] && kill $PID &> /dev
/null
50 rm -f /var
/run
/$daemon_name.pid
&> /dev
/null
51 rm_daemon
$daemon_name
63 stat_busy
"Checking $daemon_name status";
64 ck_status
$daemon_name
68 echo "usage: $0 {start|stop|restart|status}"