aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/socklog/APKBUILD2
-rw-r--r--testing/socklog/socklog.post-install21
2 files changed, 22 insertions, 1 deletions
diff --git a/testing/socklog/APKBUILD b/testing/socklog/APKBUILD
index 66706ea6e9..708035ae9f 100644
--- a/testing/socklog/APKBUILD
+++ b/testing/socklog/APKBUILD
@@ -7,7 +7,7 @@ pkgdesc="System and kernel logging services for runit"
url="http://smarden.org/socklog/"
arch="all"
license="BSD"
-makedepends="$depends_dev"
+install="$pkgname.post-install"
subpackages="$pkgname-doc"
source="http://smarden.org/$pkgname/$pkgname-$pkgver.tar.gz"
diff --git a/testing/socklog/socklog.post-install b/testing/socklog/socklog.post-install
new file mode 100644
index 0000000000..9cfa37f90e
--- /dev/null
+++ b/testing/socklog/socklog.post-install
@@ -0,0 +1,21 @@
+#!/bin/sh
+# Alpine Linux post-install script for socklog
+# Copyright 2015 Stuart Cardall (developer@it-offshore.co.uk)
+# Distributed under the terms of the GNU General Public License, v2 or later #
+
+adduser -S -H -h /var/empty -D -s /sbin/nologin log 2>/dev/null
+if [ ! -d /etc/sv/socklog-unix ]; then
+ socklog-conf unix nobody log
+ mkdir -p /etc/service
+ ln -s /etc/sv/socklog-unix /etc/service/
+fi
+
+if [ ! -f /etc/sv/socklog-unix/run ]; then
+cat > /etc/sv/socklog-unix/run <<EOF
+#!/bin/sh
+/etc/init.d/syslog stop &>/dev/null
+exec 2>&1
+exec chpst -Unobody socklog unix /dev/log
+EOF
+fi
+