aboutsummaryrefslogtreecommitdiff
path: root/network/sslh/rc.sslh
diff options
context:
space:
mode:
authormara <mara@fail.pp.ua>2014-03-09 09:26:49 +0700
committerErik Hanson <erik@slackbuilds.org>2014-03-12 12:42:49 -0500
commitd4fbceaeec3671400446bf848356cede01c8b19a (patch)
tree81b6c27347af0cee96850e09b19880763cfddb47 /network/sslh/rc.sslh
parent9e546755c07c8ad0c3d8b3189a1ac6c9e029c587 (diff)
network/sslh: Added (Applicative protocol multiplexer).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/sslh/rc.sslh')
-rw-r--r--network/sslh/rc.sslh47
1 files changed, 47 insertions, 0 deletions
diff --git a/network/sslh/rc.sslh b/network/sslh/rc.sslh
new file mode 100644
index 0000000000000..38b4a027a48c3
--- /dev/null
+++ b/network/sslh/rc.sslh
@@ -0,0 +1,47 @@
+#! /bin/sh
+
+# The prefix is normally filled by make install. If
+# installing by hand, fill it in yourself!
+NAME=sslh
+PREFIX=/usr
+DAEMON=$PREFIX/bin/${NAME}
+CONFIG=/etc/sslh/sslh.conf
+
+start()
+{
+ pid=`pidof -o %PPID sslh`
+ if [[ -z $pid ]]; then
+ echo "Start services: sslh"
+ $DAEMON -F ${CONFIG}
+ logger -t ${tag} -p ${facility} -i 'Started sslh'
+ else
+ echo "Service is running."
+ fi
+}
+
+stop()
+{
+ echo "Stop services: sslh"
+ killall -9 ${NAME}
+ logger -t ${tag} -p ${facility} -i 'Stopped sslh'
+}
+
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ sleep 5
+ start
+ ;;
+ *)
+ echo "Usage: /etc/rc.d/rc.sslh {start|stop|restart}" >&2
+ ;;
+esac
+
+exit 0