#!/sbin/openrc-run
# Generated by ../utrans from:
#  843c4f9142c604daed198c434b6677a4fd6f45a395434818261679d07aead773  ./input/openntpd.service

description="OpenNTPd Network Time Protocol."
# Documentation:
#  man:openntpd(8)

command="/usr/sbin/ntpd"
command_args="$DAEMON_OPTS"
start_stop_daemon_args="--no-new-privs --capabilities CAP_NET_BIND_SERVICE,CAP_SETGID,CAP_SETUID,CAP_SYSLOG,CAP_SYS_CHROOT,CAP_SYS_NICE,CAP_SYS_TIME,"
depend() {
    use mountnfs mountnfs-bootclean umountnfs sendsigs mountall mountall-bootclean mountoverflowtmp umountfs
    after mountnfs mountnfs-bootclean umountnfs sendsigs networking ifupdown mountall mountall-bootclean mountoverflowtmp umountfs
}

start_pre() {
  mkdir -p /run/openntpd
  /usr/sbin/ntpd -n $DAEMON_OPTS
}
stop_post() {
  rm -r /run/openntpd
}
