python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / sslh / S35sslh
blob4a613f8400d58a124e4149fc6c0a9e6131d2319e
1 #!/bin/sh
3 # Starts the SSLH server
6 # default setup : listen on port 8090 forward ssh traffic to
7 # localhost:22 and http traffic to localhost:80
8 SSLH_ARGS="--listen 0.0.0.0:8090 --ssh 127.0.0.1:22 --http 127.0.0.1:80"
10 # Allow a few customizations from a config file (overrides
11 # default setup)
12 test -r /etc/default/sslh && . /etc/default/sslh
14 start() {
15 SSLH_ARGS="$SSLH_ARGS --user root"
16 echo -n "Starting sslh: "
17 start-stop-daemon -S -q -p /var/run/sslh.pid \
18 --exec /usr/sbin/sslh -- $SSLH_ARGS
19 [ $? = 0 ] && echo "OK" || echo "FAIL"
22 stop() {
23 printf "Stopping sslh: "
24 start-stop-daemon -K -q -p /var/run/sslh.pid
25 [ $? = 0 ] && echo "OK" || echo "FAIL"
28 restart() {
29 stop
30 start
33 case "$1" in
34 start)
35 start
37 stop)
38 stop
40 restart|reload)
41 restart
44 echo "Usage: $0 {start|stop|restart}"
45 exit 1
46 esac
48 exit $?