community/ntpsec: fix init script and default config file
Fixing some issues I didn't realize earlier
- The daemon still checks the statistics directory on start up even though no logging is configured there. So, I added
statsdir
to the configuration file (/var/log/ntpstats
is chosen to follow https://gitlab.com/NTPsec/ntpsec/-/blob/master/etc/ntp.d/use-performance-logging)
ntpd[20453]: statistics directory /var/NTP/ does not exist or is unwriteable, error
- The daemon needs to be started as root before dropping to
ntp
user or else it will fail. -
nopeer
option seems to be deprecated, according to the man page:
nopeer
Deny packets which would result in mobilizing a new
association; this includes symmetric active packets when a
configured association does not exist. That used to happen when
the remote client used the peer command in its config file. We
don’t support that mode. It used to include pool servers, but
they now poke a hole in any restrictions.
It is ignored when the daemon is started:
ntpd[20453]: CONFIG: readconfig: parsing file: /etc/ntp.conf
ntpd[20453]: CONFIG: restrict nopeer ignored
ntpd[20453]: CONFIG: restrict nopeer ignored