packages/chaosvpn: use new service functions
authornico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 13 Nov 2011 22:15:40 +0000 (22:15 +0000)
committernico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 13 Nov 2011 22:15:40 +0000 (22:15 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@29056 3c298f89-4303-0410-b956-a3cf2f4a3e73

net/chaosvpn/Makefile
net/chaosvpn/files/chaosvpn.init

index 5b602ad..48e79a8 100644 (file)
@@ -1,14 +1,15 @@
-# Copyright (C) 2010 OpenWrt.org
-# All rights reserved.
+#
+# Copyright (C) 2010-2011 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
+#
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=chaosvpn
 PKG_VERSION:=2.0
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=${PKG_NAME}-${PKG_VERSION}.tar.gz
 PKG_SOURCE_URL:=http://github.com/downloads/ryd/chaosvpn/
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
 }