ntpd.rc-r1 489 B

1234567891011121314151617181920212223
  1. #!/sbin/openrc-run
  2. # Copyright 1999-2016 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License v2
  4. description="ntpd - the network time protocol daemon"
  5. pidfile="/var/run/ntpd.pid"
  6. command="/usr/sbin/ntpd"
  7. command_args="-p ${pidfile} ${NTPD_OPTS}"
  8. start_stop_daemon_args="--pidfile ${pidfile}"
  9. depend() {
  10. use net dns logger
  11. after ntp-client
  12. }
  13. start_pre() {
  14. if [ ! -f /etc/ntp.conf ] ; then
  15. eerror "Please create /etc/ntp.conf"
  16. return 1
  17. fi
  18. return 0
  19. }