[packages_10.03.2] chaosvpn: merge r29056
[10.03/packages.git] / net / chaosvpn / files / chaosvpn.init
index 0862638..d415f5d 100644 (file)
@@ -1,6 +1,10 @@
 #!/bin/sh /etc/rc.common
+# Copyright (C) 2010-2011 OpenWrt.org
+
 START=99
 
+SERVICE_DAEMONIZE=1
+
 start()
 {
        /usr/sbin/chaosvpn_config.sh
@@ -8,10 +12,10 @@ start()
                logger "not starting chaosvpn, check your config"
                exit 1
        }
-       /usr/sbin/chaosvpn -f -c /etc/tinc/chaosvpn.conf >/dev/null 2>&1 &
+       service_start /usr/sbin/chaosvpn -f -c /etc/tinc/chaosvpn.conf
 }
 
 stop()
 {
-       killall chaosvpn
+       service_stop /usr/sbin/chaosvpn
 }