diff options
Diffstat (limited to 'net-analyzer/ipcad/files/ipcad.init')
-rw-r--r-- | net-analyzer/ipcad/files/ipcad.init | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/net-analyzer/ipcad/files/ipcad.init b/net-analyzer/ipcad/files/ipcad.init new file mode 100644 index 000000000000..547fe5d07253 --- /dev/null +++ b/net-analyzer/ipcad/files/ipcad.init @@ -0,0 +1,30 @@ +#!/sbin/runscript + +depend() { + need net +} + +checkconfig() { + if [ ! -f /etc/ipcad.conf ] ; then + eerror "No /etc/ipcad.conf file exists!" + return 1 + fi + + return 0 +} + +start() { + # Comment out the following line to get faster startups + checkconfig || return 1 + + ebegin "Starting ipcad" + start-stop-daemon --start --quiet --exec /usr/sbin/ipcad -- ${IPCAD_OPTS} >/dev/null + eend $? +} + +stop () { + ebegin "Stopping ipcad" + start-stop-daemon --stop --quiet \ + --pidfile=/var/ipcad/run/ipcad.pid --retry 20 + eend $? +} |