ntpd.init 428 B

12345678910111213141516171819202122
  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2006-2011 OpenWrt.org
  3. START=65
  4. STOP=65
  5. USE_PROCD=1
  6. PROG=/sbin/ntpd
  7. HOTPLUG_HELPER=/usr/sbin/ntpd.hotplug-helper
  8. start_service() {
  9. mkdir -p /var/lib/ntp
  10. chown -R ntp:ntp /var/lib/ntp
  11. procd_open_instance
  12. procd_set_param command $PROG -g -u ntp:ntp -p /var/run/ntpd.pid -n
  13. procd_close_instance
  14. procd_open_instance
  15. procd_set_param command $HOTPLUG_HELPER
  16. procd_close_instance
  17. }