diff options
author | Oyvind Repvik <nail@nslu2-linux.org> | 2005-07-04 09:48:03 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2005-07-04 09:48:03 +0000 |
commit | e2e6ff42af82041c268819fd2c121f007cc1fb58 (patch) | |
tree | 12deaddae41eca7f0b493b6b0bd9636e86583060 /packages/openntpd | |
parent | b539a6130a2bbcc77596a53476c9d646c2a4b1d3 (diff) |
Added openntpd init-script
Diffstat (limited to 'packages/openntpd')
-rw-r--r-- | packages/openntpd/files/init | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/packages/openntpd/files/init b/packages/openntpd/files/init new file mode 100644 index 0000000000..768f8f1b8f --- /dev/null +++ b/packages/openntpd/files/init @@ -0,0 +1,36 @@ +#! /bin/sh +# +# This is an init script for openembedded +# Copy it to /etc/init.d/samba and type +# > update-rc.d init defaults 61 +# + +ntpd=/usr/sbin/ntpd +test -x "$ntpd" || exit 0 + +case "$1" in + start) + echo "Starting openntpd" + start-stop-daemon --start --quiet --exec $ntpd + ;; + stop) + echo "Stopping openntpd" + start-stop-daemon --stop --quiet --exec $ntpd + ;; + reload|force-reload) + echo "Reloading openntpd" + start-stop-daemon --stop --quiet --signal 1 --exec $ntpd + ;; + restart) + echo "Stopping openntpd" + start-stop-daemon --stop --quiet --exec $ntpd + sleep 1 + echo "Starting openntpd" + start-stop-daemon --start --quiet --exec $ntpd + ;; + *) + echo "Usage: /etc/init.d/openntpd {start|stop|reload|restart|force-reload}" + exit 1 +esac + +exit 0 |