git ssb

0+

cel / sslh



Tree: 0658982705270b6f79c5387db43e95e7c1f67465

Files: 0658982705270b6f79c5387db43e95e7c1f67465 / scripts / etc.init.d.sslh

1097 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
16# Defaults -- can be overridden in /etc/default/sslh
17LISTEN=thelonious:443
18SSH=localhost:22
19SSL=localhost:443
20
21if test -f /etc/default/sslh; then
22 . /etc/default/sslh
23fi
24
25# The prefix is normally filled by make install. If
26# installing by hand, fill it in yourself!
27PREFIX=
28DAEMON=$PREFIX/sbin/sslh
29
30start()
31{
32 echo "Start services: sslh"
33 $DAEMON -u nobody -p ${LISTEN} -s ${SSH} -l ${SSL}
34 logger -t ${tag} -p ${facility} -i 'Started sslh'
35}
36
37stop()
38{
39 echo "Stop services: sslh"
40 killall $DAEMON
41 rm ${PIDFILE}
42 logger -t ${tag} -p ${facility} -i 'Stopped sslh'
43}
44
45
46case "$1" in
47 start)
48 start
49 ;;
50 stop)
51 stop
52 ;;
53 restart)
54 stop
55 sleep 5
56 start
57 ;;
58 *)
59 echo "Usage: /etc/init.d/sslh {start|stop|restart}" >&2
60 ;;
61esac
62
63exit 0
64

Built with git-ssb-web