[packages] ntpd: use new service wrapper
authorPeter Wagner <​tripolar@gmx.at>
Wed, 9 Nov 2011 16:40:17 +0000 (16:40 +0000)
committerPeter Wagner <​tripolar@gmx.at>
Wed, 9 Nov 2011 16:40:17 +0000 (16:40 +0000)
SVN-Revision: 28881

net/ntpd/files/ntpd.init

index d8dd4f55d812f6f399ffee2d887a2684d3a453dc..d164969c79a8456b955e4043ea86e31e319d9e9f 100644 (file)
@@ -3,15 +3,15 @@
 
 START=65
 
-PIDFILE="/var/run/ntpd.pid"
+SERVICE_WRITE_PID=1
+SERVICE_DAEMONIZE=1
 
 start() {
 #      ln -sf /dev/ttyS0 /dev/gps0
 #      /usr/sbin/setgarmin -d /dev/gps -c /etc/setgarmin.conf
-       stop
-       /sbin/ntpd -g -p $PIDFILE
+       service_start /sbin/ntpd -g -n
 }
 
 stop() {
-       [ -f "$PIDFILE" ] && kill $(cat "$PIDFILE") 2>/dev/null >/dev/null
+       service_stop /sbin/ntpd
 }