mirror of
https://github.com/yrutschle/sslh.git
synced 2026-10-22 18:12:10 +03:00
v1.5: 10DEC2008
Fixed zombie generation.
Added support scripts (), Makefile.
Changed all 'connexions' to 'connections' to please
pesky users. Damn users.
This commit is contained in:
1 parent
3386a64a4d
commit
b965d735b8
5 files changed
+218
-42
No files matched your search
Executable
+4
@@ -0,0 +1,4 @@
|
||||
PIDFILE=/var/run/sslh.pid
|
||||
LISTEN=ifname:443
|
||||
SSH=localhost:22
|
||||
SSL=localhost:443
|
||||
Executable
+62
@@ -0,0 +1,62 @@
|
||||
#! /bin/sh
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: sslh
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 1
|
||||
# Short-Description: sslh proxy ssl & ssh connections
|
||||
### END INIT INFO
|
||||
|
||||
set -e
|
||||
tag=sslh
|
||||
facility=user.info
|
||||
|
||||
# /etc/init.d/sslh: start and stop the sslh proxy daemon
|
||||
|
||||
# Defaults -- can be overridden in /etc/default/sslh
|
||||
PIDFILE=/var/run/sslh.pid
|
||||
LISTEN=thelonious:443
|
||||
SSH=localhost:22
|
||||
SSL=localhost:443
|
||||
|
||||
if test -f /etc/default/sslh; then
|
||||
. /etc/default/sslh
|
||||
export PIDFILE=${PIDFILE}
|
||||
fi
|
||||
|
||||
DAEMON=/usr/local/sbin/sslh
|
||||
|
||||
start()
|
||||
{
|
||||
echo "Start services: sslh"
|
||||
$DAEMON -u nobody -p ${LISTEN} -s ${SSH} -l ${SSL}
|
||||
logger -t ${tag} -p ${facility} -i 'Started sslh'
|
||||
}
|
||||
|
||||
stop()
|
||||
{
|
||||
echo "Stop services: sslh"
|
||||
killall $DAEMON
|
||||
rm ${PIDFILE}
|
||||
logger -t ${tag} -p ${facility} -i 'Stopped sslh'
|
||||
}
|
||||
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart)
|
||||
stop
|
||||
sleep 5
|
||||
start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: /etc/init.d/sslh {start|stop|restart}" >&2
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
Reference in new issue
Block a user