First check in
This commit is contained in:
34
SNAP/usher
Executable file
34
SNAP/usher
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
case $1 in
|
||||
preinst)
|
||||
exit 0
|
||||
;;
|
||||
postinst)
|
||||
if ! getent group ntp 2>&1 > /dev/null; then
|
||||
if groupadd -g 87 ntp; then
|
||||
echo 'Created group ntp'
|
||||
else
|
||||
echo 'Failed to create group ntp!'
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
if ! getent passwd ntp 2>&1 > /dev/null; then
|
||||
if useradd -c "NTP service" -d /var/lib/ntp -g ntp \
|
||||
-s /bin/false -u 87 ntp; then
|
||||
echo 'Created user ntp'
|
||||
else
|
||||
echo 'Failed to create user ntp!'
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
prerm)
|
||||
exit 0
|
||||
;;
|
||||
postrm)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user