summaryrefslogtreecommitdiff
path: root/community/sslh
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-12-02 23:14:59 +0000
committerroot <root@rshg054.dnsready.net>2011-12-02 23:14:59 +0000
commit8eed59114cbcf729b65f87d3f73530f6c8363d20 (patch)
treedb7d4f28ed86bbb2681253cb8bae851030d111e3 /community/sslh
parent9e9ab642711f2424f828e21d14b98c45cdef2b29 (diff)
Fri Dec 2 23:14:59 UTC 2011
Diffstat (limited to 'community/sslh')
-rw-r--r--community/sslh/PKGBUILD36
-rw-r--r--community/sslh/conf.sslh3
-rw-r--r--community/sslh/rc.sslh33
3 files changed, 72 insertions, 0 deletions
diff --git a/community/sslh/PKGBUILD b/community/sslh/PKGBUILD
new file mode 100644
index 000000000..1a3c77533
--- /dev/null
+++ b/community/sslh/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id$
+# Maintainer: Sebastien Luttringer <seblu+arch@seblu.net>
+# Contributor: Le_suisse <lesuisse.dev+aur at gmail dot com>
+# Contributor: Jason Rodriguez <jason-aur@catloaf.net>
+
+pkgname=sslh
+pkgver=1.10
+pkgrel=3
+pkgdesc='SSL/SSH/OpenVPN/XMPP/tinc port multiplexer'
+arch=('i686' 'x86_64')
+url='http://www.rutschle.net/tech/sslh.shtml'
+license=('GPL2')
+backup=('etc/conf.d/sslh')
+source=("http://www.rutschle.net/tech/${pkgname}-${pkgver}.tar.gz"
+ 'rc.sslh'
+ 'conf.sslh')
+md5sums=('bc34e9a4770d634633e70589c72708cc'
+ '1ad105ad572284fa137d06ae8d1f16fc'
+ 'e9b05de9d626803e35f46bdd1e968421')
+
+build() {
+ cd $pkgname-$pkgver
+ # fix archlinux path in manpage
+ sed -i -e "s/init.d/rc.d/" sslh.pod
+ sed -i -e "s+/etc/default+/etc/conf.d+" sslh.pod
+ make
+}
+
+package() {
+ install -D -m 755 rc.sslh "${pkgdir}/etc/rc.d/sslh"
+ install -D -m 644 conf.sslh "${pkgdir}/etc/conf.d/sslh"
+ cd $pkgname-$pkgver
+ make PREFIX="$pkgdir/usr" install
+}
+
+# vim:set ts=2 sw=2 ft=sh et:
diff --git a/community/sslh/conf.sslh b/community/sslh/conf.sslh
new file mode 100644
index 000000000..e49283da2
--- /dev/null
+++ b/community/sslh/conf.sslh
@@ -0,0 +1,3 @@
+# vim:set ts=2 sw=2 ft=sh noet:
+
+SSLH_OPTIONS='-p 192.168.0.1:443 --ssh 127.0.0.1:22 --ssl 127.0.0.1:443 -u nobody -P /var/lock/sslh.lock'
diff --git a/community/sslh/rc.sslh b/community/sslh/rc.sslh
new file mode 100644
index 000000000..57912922c
--- /dev/null
+++ b/community/sslh/rc.sslh
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/sslh
+
+
+PID=$(pidof -o %PPID /usr/sbin/sslh)
+
+case "$1" in
+ start)
+ stat_busy "Starting sslh daemon"
+ [[ ! $PID ]] && /usr/sbin/sslh ${SSLH_OPTIONS} && add_daemon sslh && stat_done && exit 0
+ stat_fail
+ ;;
+ stop)
+ stat_busy "Stopping sslh daemon"
+ [[ $PID ]] && kill $PID &> /dev/null && rm_daemon sslh && stat_done && exit 0
+ stat_fail
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ exit 0
+ ;;
+ *)
+ echo "usage: ${0##*/} {start|stop|restart}" >&2
+ ;;
+esac
+
+exit 1
+
+# vim:set ts=2 sw=2 ft=sh noet: