]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/initscripts/init.d/sslh
nut: Added status option, some installation fixed
[people/pmueller/ipfire-2.x.git] / src / initscripts / init.d / 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 #$LastChangedBy: bdubbs $
8 #$Date: 2006-09-10 19:41:47 -0500 (Sun, 10 Sep 2006) $
9
10 . /etc/sysconfig/rc
11 . $rc_functions
12
13 case "$1" in
14 start)
15 boot_mesg "Starting SSLH Deamon..."
16 loadproc /usr/local/bin/sslh -u nobody -p `cat /var/ipfire/red/local-ipaddress`:443 -s localhost:222 -l localhost:444
17 evaluate_retval
18
19 if ! grep -q "443:443" /var/ipfire/xtaccess/config ; then
20 echo "tcp,0.0.0.0/0,443:443,on,0.0.0.0,SSLH" >> /var/ipfire/xtaccess/config
21 /usr/local/bin/setxtaccess
22 fi
23
24
25 ;;
26
27 stop)
28 boot_mesg "Stopping SSLH Deamon..."
29 killproc /usr/local/bin/sslh
30 evaluate_retval
31 ;;
32
33 restart)
34 $0 stop
35 sleep 1
36 $0 start
37 ;;
38
39 status)
40 statusproc /usr/local/bin/sslh
41 ;;
42
43 *)
44 echo "Usage: $0 {start|stop|restart|status}"
45 exit 1
46 ;;
47 esac
48
49 # End $rc_base/init.d/sslh