| Revision 6990,
1.4 KB
checked in by alanbach-guest, 2 years ago
(diff) |
- Added bind9 to vinnie-security
|
| Line | |
|---|
| 1 | #!/bin/sh |
|---|
| 2 | |
|---|
| 3 | ### BEGIN INIT INFO |
|---|
| 4 | # Provides: lwresd |
|---|
| 5 | # Required-Start: $remote_fs |
|---|
| 6 | # Should-Start: $syslog $network |
|---|
| 7 | # Required-Stop: $remote_fs |
|---|
| 8 | # Should-Stop: $syslog $network |
|---|
| 9 | # Default-Start: 2 3 4 5 |
|---|
| 10 | # Default-Stop: 0 1 6 |
|---|
| 11 | # Short-Description: Start and stop the Lightweight Resolver Daemon. |
|---|
| 12 | ### END INIT INFO |
|---|
| 13 | |
|---|
| 14 | . /lib/lsb/init-functions |
|---|
| 15 | |
|---|
| 16 | PATH=/sbin:/bin:/usr/sbin:/usr/bin |
|---|
| 17 | NAME=lwresd |
|---|
| 18 | DAEMON=/usr/sbin/lwresd |
|---|
| 19 | PIDFILE=/var/run/lwresd/lwresd.pid |
|---|
| 20 | |
|---|
| 21 | # Don't modify this line, change or create /etc/default/lwresd. |
|---|
| 22 | OPTIONS="" |
|---|
| 23 | |
|---|
| 24 | test -f /etc/default/lwresd && . /etc/default/lwresd |
|---|
| 25 | |
|---|
| 26 | test -x $DAEMON || exit 0 |
|---|
| 27 | |
|---|
| 28 | case "$1" in |
|---|
| 29 | start) |
|---|
| 30 | modprobe capability >/dev/null 2>&1 || true |
|---|
| 31 | |
|---|
| 32 | # dirs under /var/run can go away on reboots. |
|---|
| 33 | mkdir -p ${PIDFILE%/*} |
|---|
| 34 | chmod 775 ${PIDFILE%/*} |
|---|
| 35 | chown root:bind ${PIDFILE%/*} >/dev/null 2>&1 || true |
|---|
| 36 | |
|---|
| 37 | log_daemon_msg "Starting domain name service" $NAME |
|---|
| 38 | if start-stop-daemon --start --quiet --exec $DAEMON -- $OPTIONS; then |
|---|
| 39 | log_end_msg 0 |
|---|
| 40 | else |
|---|
| 41 | log_end_msg 1 |
|---|
| 42 | fi |
|---|
| 43 | ;; |
|---|
| 44 | |
|---|
| 45 | stop) |
|---|
| 46 | log_daemon_msg "Stopping domain name service" $NAME |
|---|
| 47 | if start-stop-daemon --stop --quiet \ |
|---|
| 48 | --pidfile ${PIDFILE} --exec $DAEMON; then |
|---|
| 49 | log_end_msg 0 |
|---|
| 50 | else |
|---|
| 51 | log_end_msg 1 |
|---|
| 52 | fi |
|---|
| 53 | ;; |
|---|
| 54 | |
|---|
| 55 | restart|force-reload) |
|---|
| 56 | $0 stop |
|---|
| 57 | sleep 2 |
|---|
| 58 | $0 start |
|---|
| 59 | ;; |
|---|
| 60 | |
|---|
| 61 | *) |
|---|
| 62 | log_action_msg "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}" |
|---|
| 63 | exit 1 |
|---|
| 64 | ;; |
|---|
| 65 | esac |
|---|
| 66 | |
|---|
| 67 | exit 0 |
|---|
Note: See
TracBrowser
for help on using the repository browser.