First check in

This commit is contained in:
2018-10-29 20:24:48 -05:00
commit de0a876a9d
15 changed files with 498 additions and 0 deletions

43
SNAP/usher Executable file
View File

@@ -0,0 +1,43 @@
#!/bin/sh
set -e
case $1 in
preinst)
exit 0
;;
postinst)
if ! getent group named 2>&1 > /dev/null; then
if groupadd -g 20 named; then
echo 'Created group named'
else
echo 'Failed to create group named!'
exit 1
fi
fi
if ! getent passwd named 2>&1 > /dev/null; then
if useradd -c 'BIND Account' -g named \
-s /bin/false -u 20 named; then
echo 'Created user named'
else
echo 'Failed to create user named!'
exit 1
fi
fi
if [ -d /var/named ]; then
chown -R named:named /var/named
fi
/etc/init.d/named status 2>&1 > /dev/null && /etc/init.d/named restart
exit 0
;;
prerm)
/etc/init.d/named status 2>&1 > /dev/null && /etc/init.d/named stop
exit 0
;;
postrm)
exit 0
;;
esac