diff options
author | nico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-05-14 21:19:23 +0000 |
---|---|---|
committer | nico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-05-14 21:19:23 +0000 |
commit | 948375bd6d59665c328e273118f7d4d7ea201098 (patch) | |
tree | 475deb526a927942f3e19c480e7e0442c065e585 /openwrt/package/htpdate/files | |
parent | 8b0ffde940c9691b9a6e4ffcda44e7bc218c8d6f (diff) |
Add htpdate package
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@899 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/package/htpdate/files')
-rw-r--r-- | openwrt/package/htpdate/files/htpdate.default | 1 | ||||
-rw-r--r-- | openwrt/package/htpdate/files/htpdate.init | 22 |
2 files changed, 23 insertions, 0 deletions
diff --git a/openwrt/package/htpdate/files/htpdate.default b/openwrt/package/htpdate/files/htpdate.default new file mode 100644 index 000000000..8c182b3ee --- /dev/null +++ b/openwrt/package/htpdate/files/htpdate.default @@ -0,0 +1 @@ +OPTIONS="-D www.google.com www.yahoo.com www.linux.org www.freebsd.org" diff --git a/openwrt/package/htpdate/files/htpdate.init b/openwrt/package/htpdate/files/htpdate.init new file mode 100644 index 000000000..9af0e5595 --- /dev/null +++ b/openwrt/package/htpdate/files/htpdate.init @@ -0,0 +1,22 @@ +#!/bin/sh + +BIN=htpdate +DEFAULT=/etc/default/$BIN +RUN_D=/var/run +PID_F=$RUN_D/$BIN.pid +[ -f $DEFAULT ] && . $DEFAULT + +case $1 in + start) + mkdir -p $RUN_D + $BIN $OPTIONS + ;; + stop) + [ -f $PID_F ] && kill $(cat $PID_F) + ;; + *) + echo "usage: $0 (start|stop)" + exit 1 +esac + +exit $? |