diff options
-rw-r--r-- | testing/sniproxy/APKBUILD | 2 | ||||
-rw-r--r-- | testing/sniproxy/sniproxy.initd | 19 | ||||
-rw-r--r-- | testing/sniproxy/sniproxy.pre-install | 4 |
3 files changed, 24 insertions, 1 deletions
diff --git a/testing/sniproxy/APKBUILD b/testing/sniproxy/APKBUILD index b73a044f22..11db51f722 100644 --- a/testing/sniproxy/APKBUILD +++ b/testing/sniproxy/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: pkgname=sniproxy pkgver=0.3.6 -pkgrel=1 +pkgrel=2 pkgdesc="Proxies incoming HTTP and TLS connections based on the hostname contained in the initial request of the TCP session." url="https://github.com/dlundquist/sniproxy" diff --git a/testing/sniproxy/sniproxy.initd b/testing/sniproxy/sniproxy.initd new file mode 100644 index 0000000000..daa326b821 --- /dev/null +++ b/testing/sniproxy/sniproxy.initd @@ -0,0 +1,19 @@ +#!/sbin/runscript + +pidfile="/var/run/${SVCNAME}.pid" +command="/usr/sbin/${SVCNAME}" +: ${conf_file:="/etc/sniproxy/sniproxy.conf"} + +depend() { + need net + after firewall +} + +start() { + ebegin "Starting $SVCNAME" + start-stop-daemon --start \ + --quiet --pidfile $pidfile --exec $command \ + -- -c "$conf_file" "$@" + eend +} + diff --git a/testing/sniproxy/sniproxy.pre-install b/testing/sniproxy/sniproxy.pre-install new file mode 100644 index 0000000000..596dad6fb9 --- /dev/null +++ b/testing/sniproxy/sniproxy.pre-install @@ -0,0 +1,4 @@ +#!/bin/sh +addgroup -S sniproxy 2>/dev/null +adduser -h /var/log/sniproxy -s /bin/false -S -D sniproxy 2>/dev/null +exit 0 |