aboutsummaryrefslogtreecommitdiffstats
path: root/testing/runit/README.alpine
diff options
context:
space:
mode:
authorStuart Cardall <developer@it-offshore.co.uk>2015-07-15 16:53:21 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2015-07-16 13:34:34 +0000
commit71d213b231cfbb03b854d7d900d1e75402f90f73 (patch)
tree91cea9907cb3fa453f333e47e23fbdfd24a9efe8 /testing/runit/README.alpine
parentccc51392cde19e7d5193219f2e376d4dd43f1672 (diff)
downloadaports-71d213b231cfbb03b854d7d900d1e75402f90f73.tar.bz2
aports-71d213b231cfbb03b854d7d900d1e75402f90f73.tar.xz
testing/runit: add init script & README.alpine
this makes runit a bit simpler to use. It is great in LXC.
Diffstat (limited to 'testing/runit/README.alpine')
-rw-r--r--testing/runit/README.alpine39
1 files changed, 39 insertions, 0 deletions
diff --git a/testing/runit/README.alpine b/testing/runit/README.alpine
new file mode 100644
index 0000000000..fe9141cb3f
--- /dev/null
+++ b/testing/runit/README.alpine
@@ -0,0 +1,39 @@
+For service supervision with runit:
+
+(1) add scripts into /etc/sv/<service>/run
+
+------------------------------
+Example: /etc/sv/nginx/run |
+------------------------------
+#!/bin/sh
+mkdir -p /tmp/nginx
+exec /usr/sbin/nginx
+------------------------------
+Example: /etc/sv/ssh/run |
+------------------------------
+#!/bin/sh
+set -e
+ssh-keygen -A
+exec /usr/sbin/sshd -D
+------------------------------
+Example: /etc/sv/tinyssh/run |
+---------------------------------------------------------------------------------
+#!/bin/sh
+PORT=22
+mkdir -p /etc/tinyssh
+/usr/sbin/tinysshd-makekey /etc/tinyssh/keys 2>/dev/null
+exec tcpserver -HRDl0 0.0.0.0 $PORT /usr/sbin/tinysshd -v -l /etc/tinyssh/sshkeys
+---------------------------------------------------------------------------------
+
+(2) set permissions:
+
+chmod 700 /etc/sv/<service>/run
+
+(3) symlink the script directory to the service directory:
+
+ln -s /etc/sv/nginx /etc/service/nginx
+
+==========================================================
+
+The socklog package by the same author can provide logging
+with built in log rotation & also be managed by runit.