]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame - src/initscripts/init.d/sslh
core76: Sort exclude file alphabetically.
[people/teissler/ipfire-2.x.git] / src / initscripts / init.d / sslh
CommitLineData
d0515b01
CS
1#!/bin/sh
2# Begin $rc_base/init.d/sslh
3
4# Based on sysklogd script from LFS-3.1 and earlier.
5# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
6
d0515b01
CS
7. /etc/sysconfig/rc
8. $rc_functions
9
10case "$1" in
11 start)
12 boot_mesg "Starting SSLH Deamon..."
d0515b01 13
230eeac0
MT
14 LOCAL_IP_ADDRESS="$(</var/ipfire/red/local-ipaddress)"
15 if [ -z "${LOCAL_IP_ADDRESS}" ]; then
16 echo_failure
17 boot_mesg -n "FAILURE:\n\nCould not determine" ${FAILURE}
18 boot_mesg -n " your external IP address."
19 boot_mesg "" ${NORMAL}
20 exit 1
d0515b01
CS
21 fi
22
0206795e 23 loadproc /usr/sbin/sslh -u nobody \
230eeac0
MT
24 -p "${LOCAL_IP_ADDRESS}:443" -s localhost:222 -l localhost:444
25 evaluate_retval
d0515b01
CS
26 ;;
27
28 stop)
29 boot_mesg "Stopping SSLH Deamon..."
0206795e 30 killproc /usr/sbin/sslh
d0515b01
CS
31 evaluate_retval
32 ;;
33
34 restart)
35 $0 stop
36 sleep 1
37 $0 start
38 ;;
39
40 status)
0206795e 41 statusproc /usr/sbin/sslh
d0515b01
CS
42 ;;
43
44 *)
45 echo "Usage: $0 {start|stop|restart|status}"
46 exit 1
47 ;;
48esac
49
50# End $rc_base/init.d/sslh