summaryrefslogtreecommitdiff
path: root/network/sslh
diff options
context:
space:
mode:
authormara <mara@fail.pp.ua>2016-09-04 23:39:34 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-09-04 23:55:53 +0700
commit6c1611b14442bde3c72cbc3cdbf1433c5d96d500 (patch)
treea0c59b55c138629737dd98bb0c2baecb24612217 /network/sslh
parent3228aeefc184fd5f07f4088a60ecb61500716c5d (diff)
downloadslackbuilds-6c1611b14442bde3c72cbc3cdbf1433c5d96d500.tar.gz
network/sslh: Updated for version 1.18.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/sslh')
-rw-r--r--network/sslh/doinst.sh2
-rw-r--r--network/sslh/rc.sslh84
-rw-r--r--network/sslh/sslh.SlackBuild14
-rw-r--r--network/sslh/sslh.info6
4 files changed, 56 insertions, 50 deletions
diff --git a/network/sslh/doinst.sh b/network/sslh/doinst.sh
index 4051164274..21de93c717 100644
--- a/network/sslh/doinst.sh
+++ b/network/sslh/doinst.sh
@@ -23,4 +23,4 @@ preserve_perms() {
}
preserve_perms etc/rc.d/rc.sslh.new
-config etc/sslh/sslh.conf.new
+config etc/sslh/sslh.cfg.new
diff --git a/network/sslh/rc.sslh b/network/sslh/rc.sslh
index 38b4a027a4..74c95ca56d 100644
--- a/network/sslh/rc.sslh
+++ b/network/sslh/rc.sslh
@@ -1,47 +1,53 @@
-#! /bin/sh
+#!/bin/sh
+#
+# /etc/rc.d/rc.sslh
+#
+# Start/stop/restart the sslh daemon.
+#
-# 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
+NAME="sslh"
+config="/etc/${NAME}/${NAME}.cfg"
+pidfile="/var/run/${NAME}.pid"
-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
+start() {
+ if [[ -z $(pidof -o %PPID $NAME) ]]; then
+ rm $pidfile &>/dev/null
+ fi
+
+ if [ ! -f $pidfile ]; then
+ echo "Start services: $NAME"
+ ${NAME} -F $config >/dev/null 2>&1
+ else
+ echo "Services $NAME already running."
+ fi
}
-stop()
-{
- echo "Stop services: sslh"
- killall -9 ${NAME}
- logger -t ${tag} -p ${facility} -i 'Stopped sslh'
+stop() {
+ if [ -f $pidfile ]; then
+ echo "Stop services: $NAME"
+ kill $(cat $pidfile) >/dev/null 2>&1
+ rm $pidfile &>/dev/null
+ else
+ echo "Services $NAME is not running."
+ fi
}
+restart() {
+ stop
+ sleep 2
+ start
+}
-case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- restart)
- stop
- sleep 5
- start
- ;;
- *)
- echo "Usage: /etc/rc.d/rc.sslh {start|stop|restart}" >&2
- ;;
+case $1 in
+'start')
+ start
+ ;;
+'stop')
+ stop
+ ;;
+'restart')
+ restart
+ ;;
+*)
+ echo "Usage $0 {start|stop|restart}"
esac
-
-exit 0
diff --git a/network/sslh/sslh.SlackBuild b/network/sslh/sslh.SlackBuild
index 8461b9a377..1490c14546 100644
--- a/network/sslh/sslh.SlackBuild
+++ b/network/sslh/sslh.SlackBuild
@@ -7,13 +7,13 @@
#
PRGNAM=sslh
-VERSION=${VERSION:-1.16}
+VERSION=${VERSION:-1.18}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -24,8 +24,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -51,7 +51,7 @@ find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# fix slackware path in manpage
sed -i 's/init.d/rc.d/' sslh.pod
@@ -59,9 +59,9 @@ sed -i 's+/etc/default+/etc/sslh+' sslh.pod
make VERSION=\"v$VERSION\"
# install initscripts
-install -Dm 755 $CWD/rc.sslh $PKG/etc/rc.d/rc.sslh.new
+install -Dm 644 $CWD/rc.sslh $PKG/etc/rc.d/rc.sslh.new
# install example file
-install -Dm 0644 example.cfg $PKG/etc/sslh/sslh.conf.new
+install -Dm 0644 example.cfg $PKG/etc/sslh/sslh.cfg.new
# manually install to have both ssl-fork and ssl-select
install -Dm 0755 sslh-fork $PKG/usr/bin/sslh-fork
install -Dm 0755 sslh-select $PKG/usr/bin/sslh-select
diff --git a/network/sslh/sslh.info b/network/sslh/sslh.info
index 2ce0fde561..67dde2b8c9 100644
--- a/network/sslh/sslh.info
+++ b/network/sslh/sslh.info
@@ -1,8 +1,8 @@
PRGNAM="sslh"
-VERSION="1.16"
+VERSION="1.18"
HOMEPAGE="http://www.rutschle.net/tech/sslh.shtml"
-DOWNLOAD="http://www.rutschle.net/tech/sslh-v1.16.tar.gz"
-MD5SUM="c6e7d1cb0adb15f6efe480e36d98c560"
+DOWNLOAD="http://www.rutschle.net/tech/sslh-v1.18.tar.gz"
+MD5SUM="0e3568d5d234516c634d4df156473298"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="libconfig"