git ssb

0+

cel / sslh



Tree: 9bcb2cdd7a920ebc78b59d0b5797d678424aa93a

Files: 9bcb2cdd7a920ebc78b59d0b5797d678424aa93a / scripts / etc.init.d.sslh

998 bytesRaw
1#! /bin/sh
2
3### BEGIN INIT INFO
4# Provides: sslh
5# Default-Start: 2 3 4 5
6# Default-Stop: 1
7# Short-Description: sslh proxy ssl & ssh connections
8### END INIT INFO
9
10set -e
11tag=sslh
12facility=user.info
13
14# /etc/init.d/sslh: start and stop the sslh proxy daemon
15
16if test -f /etc/default/sslh; then
17 . /etc/default/sslh
18fi
19
20# The prefix is normally filled by make install. If
21# installing by hand, fill it in yourself!
22PREFIX=
23DAEMON=$PREFIX/sbin/sslh
24
25start()
26{
27 echo "Start services: sslh"
28 $DAEMON --user ${USER} --pidfile ${PID} --listen ${LISTEN} --ssh ${SSH} --ssl ${SSL}
29 logger -t ${tag} -p ${facility} -i 'Started sslh'
30}
31
32stop()
33{
34 echo "Stop services: sslh"
35 killall $DAEMON
36 logger -t ${tag} -p ${facility} -i 'Stopped sslh'
37}
38
39
40case "$1" in
41 start)
42 start
43 ;;
44 stop)
45 stop
46 ;;
47 restart)
48 stop
49 sleep 5
50 start
51 ;;
52 *)
53 echo "Usage: /etc/init.d/sslh {start|stop|restart}" >&2
54 ;;
55esac
56
57exit 0
58

Built with git-ssb-web