1
0

htpdate.init 298 B

12345678910111213141516171819
  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2006 OpenWrt.org
  3. START=49
  4. BIN=htpdate
  5. DEFAULT=/etc/default/$BIN
  6. RUN_D=/var/run
  7. PID_F=$RUN_D/$BIN.pid
  8. start() {
  9. [ -f $DEFAULT ] && . $DEFAULT
  10. mkdir -p $RUN_D
  11. $BIN -l -s -t $OPTIONS && $BIN -D $OPTIONS
  12. }
  13. stop() {
  14. [ -f $PID_F ] && kill $(cat $PID_F)
  15. }