File: init.d

package info (click to toggle)
pound 4.17-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,008 kB
  • sloc: ansic: 26,296; perl: 2,311; makefile: 242; sh: 42; sed: 18
file content (38 lines) | stat: -rw-r--r-- 1,058 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing.
if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
    set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
fi
### BEGIN INIT INFO
# Provides:          pound
# Required-Start:    $local_fs $syslog
# Required-Stop:     $local_fs $syslog
# Should-Start:      $named
# Should-Stop:       $named
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: reverse proxy and load balancer
# Description:       reverse proxy, load balancer and
#                    HTTPS front-end for Web servers
### END INIT INFO

DAEMON=/usr/sbin/pound
DESC="reverse proxy and load balancer"
NAME=pound
PIDFILE=/run/pound.pid

do_start_prepare() {
    if [ ! -f "/etc/pound.cfg" ]; then
	log_daemon_msg "Pound unconfigured, not (re)starting (/etc/pound.cfg is missing)\n"
	exit 0
    elif $DAEMON -c ; then
	true
    else
	log_daemon_msg "Failed to validate config file, refusing to (re)start\n"
	exit 0
    fi
}

do_restart_prepare() {
    do_start_prepare
}