initial import
This commit is contained in:
15
openntpd/openntpd.install
Normal file
15
openntpd/openntpd.install
Normal file
@@ -0,0 +1,15 @@
|
||||
post_install() {
|
||||
getent group ntp &>/dev/null || groupadd -g 87 ntp >/dev/null
|
||||
getent passwd ntp &>/dev/null || useradd -u 87 -g ntp -d /var/lib/ntp \
|
||||
-c 'Network Time Protocol' -s /bin/nologin ntp >/dev/null
|
||||
ntp_shell=$(getent passwd ntp | cut -d: -f7)
|
||||
if [ "$ntp_shell" != '/bin/nologin' ]; then
|
||||
chsh -s /bin/nologin ntp &>/dev/null
|
||||
fi
|
||||
# fix /var/db/ntpd.drift is empty
|
||||
echo "0.0" > /var/db/ntpd.drift
|
||||
}
|
||||
|
||||
post_upgrade(){
|
||||
post_install
|
||||
}
|
||||
Reference in New Issue
Block a user