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