Moved to slp format
This commit is contained in:
5
SL/README
Normal file
5
SL/README
Normal file
@@ -0,0 +1,5 @@
|
||||
This is the directory where the manifest, snapinfo,
|
||||
and files.tar.gz files will be created. It is also
|
||||
where the usher file should be placed if it is
|
||||
required by the package. Any other files that need
|
||||
to be included could also be placed here.
|
||||
48
SL/named.init
Normal file
48
SL/named.init
Normal file
@@ -0,0 +1,48 @@
|
||||
#!/bin/sh
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: bind
|
||||
# Required-Start: $time $network
|
||||
# Should-Start:
|
||||
# Required-Stop: $network
|
||||
# Should-Stop: $remote_fs
|
||||
# Default-Start: 3 4 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: DNS Daemon
|
||||
# Description: Provides a local DNS daemon
|
||||
### END INIT INFO
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
[ -r /etc/default/named ] && . /etc/default/named
|
||||
|
||||
NAME="named"
|
||||
DAEMON="/usr/sbin/named"
|
||||
PIDFILE="/var/run/named.pid"
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
log_init_msg "Starting named"
|
||||
start_daemon "$DAEMON" "$NAMEDOPTS" && log_success_msg || log_failure_msg
|
||||
;;
|
||||
stop)
|
||||
log_init_msg "Stopping named"
|
||||
killproc -p "$PIDFILE" "$DAEMON" && log_success_msg || log_failure_msg
|
||||
;;
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
reload)
|
||||
log_init_msg "Reloading named"
|
||||
killproc -p "$PIDFILE" "$DAEMON" -HUP && log_success_msg || log_failure_msg
|
||||
;;
|
||||
status)
|
||||
status_of_proc -p "$PIDFILE" "$DAEMON"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart|reload|status}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
43
SL/usher
Executable file
43
SL/usher
Executable 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
|
||||
Reference in New Issue
Block a user