mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-18 22:06:04 +01:00
d4fbceaeec
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
47 lines
812 B
Bash
47 lines
812 B
Bash
#! /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
|