aboutsummaryrefslogtreecommitdiffstats
path: root/testing/openvcp/openvcp.initd
diff options
context:
space:
mode:
Diffstat (limited to 'testing/openvcp/openvcp.initd')
-rw-r--r--testing/openvcp/openvcp.initd17
1 files changed, 8 insertions, 9 deletions
diff --git a/testing/openvcp/openvcp.initd b/testing/openvcp/openvcp.initd
index 9acc4d1092..9e9f92b3e4 100644
--- a/testing/openvcp/openvcp.initd
+++ b/testing/openvcp/openvcp.initd
@@ -1,21 +1,20 @@
#!/sbin/runscript
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="openvcpd"
-NAME=openvcpd
-DAEMON=/usr/bin/$NAME
-DAEMON_ARGS=""
-PIDFILE=/var/run/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
+depend () {
+ use net
+ after firewall
+}
start() {
ebegin "OpenVCP Starting"
- start-stop-daemon --start --quiet --background --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS || return 1
+ start-stop-daemon --start --quiet --background --exec /bin/openvcpd -- --pidfile /var/run/openvcpd.pid || return 1
eend $?
}
stop() {
ebegin "OpenVCP Stopping"
- start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
+ kpid=`cat /var/run/openvcpd.pid`
+ kill -kill `expr $kpid - 1`
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile /var/run/openvcpd.pid
eend $?
}