]> git.ipfire.org Git - ipfire-2.x.git/blob - src/initscripts/packages/sslh
kernel: update to 6.6.28
[ipfire-2.x.git] / src / initscripts / packages / sslh
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
7 . /etc/sysconfig/rc
8 . $rc_functions
9
10 case "$1" in
11 start)
12 boot_mesg "Starting SSLH Deamon..."
13
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
21 fi
22
23 loadproc /usr/sbin/sslh -u nobody \
24 -p "${LOCAL_IP_ADDRESS}:443" -s localhost:222 -l localhost:444
25 evaluate_retval
26 ;;
27
28 stop)
29 boot_mesg "Stopping SSLH Deamon..."
30 killproc /usr/sbin/sslh
31 evaluate_retval
32 ;;
33
34 restart)
35 $0 stop
36 sleep 1
37 $0 start
38 ;;
39
40 status)
41 statusproc /usr/sbin/sslh
42 ;;
43
44 *)
45 echo "Usage: $0 {start|stop|restart|status}"
46 exit 1
47 ;;
48 esac
49
50 # End $rc_base/init.d/sslh