diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2015-03-13 07:40:41 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2015-03-13 07:40:41 +0000 |
commit | 22c52d6b663fcb64f8ce909c19b15e321fa53c82 (patch) | |
tree | 3f6e655dd0694a44ac3bc436647976b66a27fc36 | |
parent | f29e85113022b7c4fee1190015124c4cb48635af (diff) | |
download | aports-22c52d6b663fcb64f8ce909c19b15e321fa53c82.tar.bz2 aports-22c52d6b663fcb64f8ce909c19b15e321fa53c82.tar.xz |
testing/sniproxy: fix pid file creation, add default config
-rw-r--r-- | testing/sniproxy/APKBUILD | 22 | ||||
-rw-r--r-- | testing/sniproxy/sniproxy.conf | 26 | ||||
-rw-r--r-- | testing/sniproxy/sniproxy.initd | 2 |
3 files changed, 41 insertions, 9 deletions
diff --git a/testing/sniproxy/APKBUILD b/testing/sniproxy/APKBUILD index 11db51f722..a119e287f5 100644 --- a/testing/sniproxy/APKBUILD +++ b/testing/sniproxy/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: pkgname=sniproxy pkgver=0.3.6 -pkgrel=2 +pkgrel=3 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" @@ -15,11 +15,12 @@ makedepends="$depends_dev autoconf automake bsd-compat-headers gettext-dev " install="${pkgname}.pre-install" subpackages="$pkgname-doc" -source="https://github.com/dlundquist/$pkgname/archive/$pkgver.tar.gz - $pkgname.initd" pkgusers="sniproxy" pkggroups="sniproxy" - +source="https://github.com/dlundquist/$pkgname/archive/$pkgver.tar.gz + $pkgname.initd + $pkgname.conf + " _builddir="$srcdir"/$pkgname-$pkgver @@ -43,15 +44,20 @@ package() { make DESTDIR="$pkgdir" install || return 1 install -Dm755 "$srcdir"/$pkgname.initd \ "$pkgdir"/etc/init.d/$pkgname || return 1 - for dir in /var/log /etc; do + install -Dm644 "$srcdir"/$pkgname.conf \ + "$pkgdir"/etc/$pkgname/$pkgname.conf || return 1 + for dir in /var/log /etc /var/run; do mkdir -p "$pkgdir"/$dir/$pkgname chown $pkgusers:$pkggroups "$pkgdir"/$dir/$pkgname done } md5sums="52a01eb55ac7712de2dd13f1ba6260e4 0.3.6.tar.gz -7ce27ae791416c62dab08b2961b3a57c sniproxy.initd" +05affd59cfc21d9c9cad78fc886c075b sniproxy.initd +8f21930affabea377c0443059d94f3f7 sniproxy.conf" sha256sums="90183ea5a380f1f946a9e0286334c916c2315bf005677ddc72f0afeed84a544c 0.3.6.tar.gz -6eac747753ddb798ba3c9970a1e165c6a523bff3bc90f3c078eab066470a0f6d sniproxy.initd" +8ecb624c3a12fa73980cd66d043b96cc31f34da20e1ed6ad060f832f49f897a0 sniproxy.initd +23ee2894715f834f0708182e93cee30535bd0d58b5aa600a2b45b799deaf64e1 sniproxy.conf" sha512sums="5d2a3b181c3a710a5443c21d3c6181354e473c134e99a258b4d10dc452d449507d057ef65ad0586ecc43800b271fc03635f3d27a043855846248ca14e807781c 0.3.6.tar.gz -6dea98a5428b97a1def6d0fa0b08386a8b2dfccf6d53a1d3eafb78352aac6caede72eece23c883a048876731c247abfda51e5a9e00ed628c5f1b2ce846d1e74a sniproxy.initd" +e4a39bcaf3a0766fda3087c512c7838835c4bb2990fa3cf334c5def0ae009fbf72fff004cf7aa3a89a32f3bf47f29424cc571efc1df11109166adac94b78eb56 sniproxy.initd +f7423cfd48e9333d5db857b4eb61b747664221607e2d47a55167493159b7b838580f101427e98252468c0be9c42693f7f0689ac8bd1acdcd1dfb75638a8f49fb sniproxy.conf" diff --git a/testing/sniproxy/sniproxy.conf b/testing/sniproxy/sniproxy.conf new file mode 100644 index 0000000000..7252e312f3 --- /dev/null +++ b/testing/sniproxy/sniproxy.conf @@ -0,0 +1,26 @@ +user sniproxy +pidfile /var/run/sniproxy/sniproxy.pid + +error_log { + filename /var/log/sniproxy/error.log + priority notice +} + +listener 127.0.0.1 80 { + proto http + access_log { + filename /var/log/sniproxy/access.log + } +} + +listener 127.0.0.1 443 { + proto tls + access_log { + filename /var/log/sniproxy/access.log + } +} + +table { + mydomain\.com * +} + diff --git a/testing/sniproxy/sniproxy.initd b/testing/sniproxy/sniproxy.initd index daa326b821..fcaa28c697 100644 --- a/testing/sniproxy/sniproxy.initd +++ b/testing/sniproxy/sniproxy.initd @@ -1,6 +1,6 @@ #!/sbin/runscript -pidfile="/var/run/${SVCNAME}.pid" +pidfile="/var/run/${SVCNAME}/${SVCNAME}.pid" command="/usr/sbin/${SVCNAME}" : ${conf_file:="/etc/sniproxy/sniproxy.conf"} |