initial import

This commit is contained in:
2025-06-22 20:39:04 -05:00
commit f8a70886f0
3428 changed files with 302546 additions and 0 deletions

28
ntp/ntp.install Normal file
View File

@@ -0,0 +1,28 @@
post_install() {
if ! getent group ntp &>/dev/null; then
groupadd -g 87 ntp >/dev/null
fi
if ! getent passwd ntp &>/dev/null; then
useradd -u 87 -g ntp -G adm -d /var/lib/ntp -c 'Network Time Protocol' -s /bin/nologin ntp >/dev/null
fi
if ! groups ntp | grep adm &>/dev/null; then
gpasswd -a ntp adm >/dev/null
fi
ntp_shell=$(getent passwd ntp | cut -d: -f7)
if [ "$ntp_shell" != '/bin/nologin' ]; then
chsh -s /bin/nologin ntp &>/dev/null
fi
}
post_upgrade(){
post_install
}
post_remove(){
if getent passwd ntp &>/dev/null; then
userdel ntp >/dev/null
fi
if getent group ntp &>/dev/null; then
groupdel ntp >/dev/null
fi
}