diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b9c199c --- /dev/null +++ b/LICENSE @@ -0,0 +1,8 @@ +ISC License: + +Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC") +Copyright (c) 1995-2003 by Internet Software Consortium + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/etc/runit/runsvdir/default/dhclient b/etc/runit/runsvdir/default/dhclient new file mode 120000 index 0000000..9124f25 --- /dev/null +++ b/etc/runit/runsvdir/default/dhclient @@ -0,0 +1 @@ +/usr/lib/runit/sv/dhclient \ No newline at end of file diff --git a/etc/runit/runsvdir/default/dhclient-wlan0 b/etc/runit/runsvdir/default/dhclient-wlan0 new file mode 120000 index 0000000..e5de971 --- /dev/null +++ b/etc/runit/runsvdir/default/dhclient-wlan0 @@ -0,0 +1 @@ +/usr/lib/runit/sv/dhclient-wlan0 \ No newline at end of file diff --git a/etc/runit/runsvdir/default/ntpd b/etc/runit/runsvdir/default/ntpd new file mode 120000 index 0000000..503e93c --- /dev/null +++ b/etc/runit/runsvdir/default/ntpd @@ -0,0 +1 @@ +/usr/lib/runit/sv/ntpd \ No newline at end of file diff --git a/etc/runit/runsvdir/default/wpa_supplicant b/etc/runit/runsvdir/default/wpa_supplicant new file mode 120000 index 0000000..cc12e0c --- /dev/null +++ b/etc/runit/runsvdir/default/wpa_supplicant @@ -0,0 +1 @@ +/usr/lib/runit/sv/wpa_supplicant \ No newline at end of file diff --git a/usr/lib/runit/sv/NetworkManager/run b/usr/lib/runit/sv/NetworkManager/run new file mode 100755 index 0000000..3b4d79c --- /dev/null +++ b/usr/lib/runit/sv/NetworkManager/run @@ -0,0 +1,8 @@ +#!/bin/sh +sv check dbus >/dev/null || exit 1 +# Create required dirs +[ ! -d /etc/NetworkManager/dispatcher.d ] && mkdir -m0755 -p /etc/NetworkManager/dispatcher.d +[ ! -d /etc/NetworkManager/VPN ] && mkdir -m0755 -p /etc/NetworkManager/VPN +[ ! -d /etc/NetworkManager/system-connections ] && mkdir -m0755 -p /etc/NetworkManager/system-connections +[ ! -d /var/lib/NetworkManager ] && mkdir -m0700 -p /var/lib/NetworkManager +exec NetworkManager -n > /dev/null 2>&1 diff --git a/usr/lib/runit/sv/acpid/log/run b/usr/lib/runit/sv/acpid/log/run new file mode 100755 index 0000000..0542162 --- /dev/null +++ b/usr/lib/runit/sv/acpid/log/run @@ -0,0 +1,6 @@ +#!/bin/sh +exec 2>&1; set -e + +[ -d /var/log/acpid ] || install -dm 755 /var/log/acpid + +exec svlogd -tt /var/log/acpid diff --git a/usr/lib/runit/sv/acpid/run b/usr/lib/runit/sv/acpid/run new file mode 100755 index 0000000..355c405 --- /dev/null +++ b/usr/lib/runit/sv/acpid/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec acpid -f 2>&1 diff --git a/usr/lib/runit/sv/agetty-console/conf b/usr/lib/runit/sv/agetty-console/conf new file mode 100755 index 0000000..c725133 --- /dev/null +++ b/usr/lib/runit/sv/agetty-console/conf @@ -0,0 +1,2 @@ +BAUD_RATE=38400 +TERM_NAME=linux diff --git a/usr/lib/runit/sv/agetty-console/finish b/usr/lib/runit/sv/agetty-console/finish new file mode 100755 index 0000000..f23bb9d --- /dev/null +++ b/usr/lib/runit/sv/agetty-console/finish @@ -0,0 +1,3 @@ +#!/bin/sh +tty=${PWD##*-} +exec utmpset -w $tty diff --git a/usr/lib/runit/sv/agetty-console/run b/usr/lib/runit/sv/agetty-console/run new file mode 100755 index 0000000..41a8cf7 --- /dev/null +++ b/usr/lib/runit/sv/agetty-console/run @@ -0,0 +1,16 @@ +#!/bin/sh + +tty=${PWD##*-} + +[ -r conf ] && . ./conf + +if [ -x /sbin/getty -o -x /bin/getty ]; then + # busybox + GETTY=getty +elif [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux + GETTY=agetty +fi + +exec setsid ${GETTY} ${GETTY_ARGS} \ + "${tty}" "${BAUD_RATE}" "${TERM_NAME}" diff --git a/usr/lib/runit/sv/agetty-console/supervise b/usr/lib/runit/sv/agetty-console/supervise new file mode 120000 index 0000000..e34cd41 --- /dev/null +++ b/usr/lib/runit/sv/agetty-console/supervise @@ -0,0 +1 @@ +/run/runit/supervise.agetty-console \ No newline at end of file diff --git a/usr/lib/runit/sv/agetty-generic/finish b/usr/lib/runit/sv/agetty-generic/finish new file mode 100755 index 0000000..f23bb9d --- /dev/null +++ b/usr/lib/runit/sv/agetty-generic/finish @@ -0,0 +1,3 @@ +#!/bin/sh +tty=${PWD##*-} +exec utmpset -w $tty diff --git a/usr/lib/runit/sv/agetty-generic/run b/usr/lib/runit/sv/agetty-generic/run new file mode 100755 index 0000000..4e8a066 --- /dev/null +++ b/usr/lib/runit/sv/agetty-generic/run @@ -0,0 +1,17 @@ +#!/bin/sh + +tty=${PWD##*-} + +[ -r conf ] && . ./conf + +if [ -x /sbin/getty -o -x /bin/getty ]; then + # busybox + GETTY=getty +elif [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux + GETTY=agetty +fi +## from void below +## exec chpst -P ${GETTY} ${GETTY_ARGS} \ +exec setsid ${GETTY} ${GETTY_ARGS} \ + "${tty}" "${BAUD_RATE}" "${TERM_NAME}" diff --git a/usr/lib/runit/sv/agetty-serial/conf b/usr/lib/runit/sv/agetty-serial/conf new file mode 100755 index 0000000..e99c38e --- /dev/null +++ b/usr/lib/runit/sv/agetty-serial/conf @@ -0,0 +1,8 @@ +GETTY_ARGS="-L" +if [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux specific settings + GETTY_ARGS="${GETTY_ARGS} -8" +fi + +BAUD_RATE=115200 +TERM_NAME=vt100 diff --git a/usr/lib/runit/sv/agetty-serial/finish b/usr/lib/runit/sv/agetty-serial/finish new file mode 100755 index 0000000..f23bb9d --- /dev/null +++ b/usr/lib/runit/sv/agetty-serial/finish @@ -0,0 +1,3 @@ +#!/bin/sh +tty=${PWD##*-} +exec utmpset -w $tty diff --git a/usr/lib/runit/sv/agetty-serial/run b/usr/lib/runit/sv/agetty-serial/run new file mode 100755 index 0000000..41a8cf7 --- /dev/null +++ b/usr/lib/runit/sv/agetty-serial/run @@ -0,0 +1,16 @@ +#!/bin/sh + +tty=${PWD##*-} + +[ -r conf ] && . ./conf + +if [ -x /sbin/getty -o -x /bin/getty ]; then + # busybox + GETTY=getty +elif [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux + GETTY=agetty +fi + +exec setsid ${GETTY} ${GETTY_ARGS} \ + "${tty}" "${BAUD_RATE}" "${TERM_NAME}" diff --git a/usr/lib/runit/sv/agetty-tty1/conf b/usr/lib/runit/sv/agetty-tty1/conf new file mode 100755 index 0000000..b9b33c2 --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty1/conf @@ -0,0 +1,9 @@ +if [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux specific settings + if [ "${tty}" = "tty1" ]; then + GETTY_ARGS="--noclear" + fi +fi + +BAUD_RATE=38400 +TERM_NAME=linux diff --git a/usr/lib/runit/sv/agetty-tty1/finish b/usr/lib/runit/sv/agetty-tty1/finish new file mode 100755 index 0000000..f23bb9d --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty1/finish @@ -0,0 +1,3 @@ +#!/bin/sh +tty=${PWD##*-} +exec utmpset -w $tty diff --git a/usr/lib/runit/sv/agetty-tty1/run b/usr/lib/runit/sv/agetty-tty1/run new file mode 100755 index 0000000..41a8cf7 --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty1/run @@ -0,0 +1,16 @@ +#!/bin/sh + +tty=${PWD##*-} + +[ -r conf ] && . ./conf + +if [ -x /sbin/getty -o -x /bin/getty ]; then + # busybox + GETTY=getty +elif [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux + GETTY=agetty +fi + +exec setsid ${GETTY} ${GETTY_ARGS} \ + "${tty}" "${BAUD_RATE}" "${TERM_NAME}" diff --git a/usr/lib/runit/sv/agetty-tty1/supervise b/usr/lib/runit/sv/agetty-tty1/supervise new file mode 120000 index 0000000..a23f48f --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty1/supervise @@ -0,0 +1 @@ +/run/runit/supervise.agetty-tty1 \ No newline at end of file diff --git a/usr/lib/runit/sv/agetty-tty12/conf b/usr/lib/runit/sv/agetty-tty12/conf new file mode 100755 index 0000000..b9b33c2 --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty12/conf @@ -0,0 +1,9 @@ +if [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux specific settings + if [ "${tty}" = "tty1" ]; then + GETTY_ARGS="--noclear" + fi +fi + +BAUD_RATE=38400 +TERM_NAME=linux diff --git a/usr/lib/runit/sv/agetty-tty12/finish b/usr/lib/runit/sv/agetty-tty12/finish new file mode 100755 index 0000000..f23bb9d --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty12/finish @@ -0,0 +1,3 @@ +#!/bin/sh +tty=${PWD##*-} +exec utmpset -w $tty diff --git a/usr/lib/runit/sv/agetty-tty12/run b/usr/lib/runit/sv/agetty-tty12/run new file mode 100755 index 0000000..41a8cf7 --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty12/run @@ -0,0 +1,16 @@ +#!/bin/sh + +tty=${PWD##*-} + +[ -r conf ] && . ./conf + +if [ -x /sbin/getty -o -x /bin/getty ]; then + # busybox + GETTY=getty +elif [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux + GETTY=agetty +fi + +exec setsid ${GETTY} ${GETTY_ARGS} \ + "${tty}" "${BAUD_RATE}" "${TERM_NAME}" diff --git a/usr/lib/runit/sv/agetty-tty12/supervise b/usr/lib/runit/sv/agetty-tty12/supervise new file mode 120000 index 0000000..6f64f90 --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty12/supervise @@ -0,0 +1 @@ +/run/runit/supervise.agetty-tty12 \ No newline at end of file diff --git a/usr/lib/runit/sv/agetty-tty2/conf b/usr/lib/runit/sv/agetty-tty2/conf new file mode 100755 index 0000000..f084d9a --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty2/conf @@ -0,0 +1,9 @@ +if [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux specific settings + if [ "${tty}" = "tty2" ]; then + GETTY_ARGS="--noclear" + fi +fi + +BAUD_RATE=38400 +TERM_NAME=linux diff --git a/usr/lib/runit/sv/agetty-tty2/finish b/usr/lib/runit/sv/agetty-tty2/finish new file mode 100755 index 0000000..f23bb9d --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty2/finish @@ -0,0 +1,3 @@ +#!/bin/sh +tty=${PWD##*-} +exec utmpset -w $tty diff --git a/usr/lib/runit/sv/agetty-tty2/run b/usr/lib/runit/sv/agetty-tty2/run new file mode 100755 index 0000000..41a8cf7 --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty2/run @@ -0,0 +1,16 @@ +#!/bin/sh + +tty=${PWD##*-} + +[ -r conf ] && . ./conf + +if [ -x /sbin/getty -o -x /bin/getty ]; then + # busybox + GETTY=getty +elif [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux + GETTY=agetty +fi + +exec setsid ${GETTY} ${GETTY_ARGS} \ + "${tty}" "${BAUD_RATE}" "${TERM_NAME}" diff --git a/usr/lib/runit/sv/agetty-tty2/supervise b/usr/lib/runit/sv/agetty-tty2/supervise new file mode 120000 index 0000000..a3aee31 --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty2/supervise @@ -0,0 +1 @@ +/run/runit/supervise.agetty-tty2 \ No newline at end of file diff --git a/usr/lib/runit/sv/agetty-tty3/conf b/usr/lib/runit/sv/agetty-tty3/conf new file mode 100755 index 0000000..b9b33c2 --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty3/conf @@ -0,0 +1,9 @@ +if [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux specific settings + if [ "${tty}" = "tty1" ]; then + GETTY_ARGS="--noclear" + fi +fi + +BAUD_RATE=38400 +TERM_NAME=linux diff --git a/usr/lib/runit/sv/agetty-tty3/finish b/usr/lib/runit/sv/agetty-tty3/finish new file mode 100755 index 0000000..f23bb9d --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty3/finish @@ -0,0 +1,3 @@ +#!/bin/sh +tty=${PWD##*-} +exec utmpset -w $tty diff --git a/usr/lib/runit/sv/agetty-tty3/run b/usr/lib/runit/sv/agetty-tty3/run new file mode 100755 index 0000000..41a8cf7 --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty3/run @@ -0,0 +1,16 @@ +#!/bin/sh + +tty=${PWD##*-} + +[ -r conf ] && . ./conf + +if [ -x /sbin/getty -o -x /bin/getty ]; then + # busybox + GETTY=getty +elif [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux + GETTY=agetty +fi + +exec setsid ${GETTY} ${GETTY_ARGS} \ + "${tty}" "${BAUD_RATE}" "${TERM_NAME}" diff --git a/usr/lib/runit/sv/agetty-tty3/supervise b/usr/lib/runit/sv/agetty-tty3/supervise new file mode 120000 index 0000000..06d8483 --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty3/supervise @@ -0,0 +1 @@ +/run/runit/supervise.agetty-tty3 \ No newline at end of file diff --git a/usr/lib/runit/sv/agetty-tty4/conf b/usr/lib/runit/sv/agetty-tty4/conf new file mode 100755 index 0000000..b9b33c2 --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty4/conf @@ -0,0 +1,9 @@ +if [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux specific settings + if [ "${tty}" = "tty1" ]; then + GETTY_ARGS="--noclear" + fi +fi + +BAUD_RATE=38400 +TERM_NAME=linux diff --git a/usr/lib/runit/sv/agetty-tty4/finish b/usr/lib/runit/sv/agetty-tty4/finish new file mode 100755 index 0000000..f23bb9d --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty4/finish @@ -0,0 +1,3 @@ +#!/bin/sh +tty=${PWD##*-} +exec utmpset -w $tty diff --git a/usr/lib/runit/sv/agetty-tty4/run b/usr/lib/runit/sv/agetty-tty4/run new file mode 100755 index 0000000..41a8cf7 --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty4/run @@ -0,0 +1,16 @@ +#!/bin/sh + +tty=${PWD##*-} + +[ -r conf ] && . ./conf + +if [ -x /sbin/getty -o -x /bin/getty ]; then + # busybox + GETTY=getty +elif [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux + GETTY=agetty +fi + +exec setsid ${GETTY} ${GETTY_ARGS} \ + "${tty}" "${BAUD_RATE}" "${TERM_NAME}" diff --git a/usr/lib/runit/sv/agetty-tty4/supervise b/usr/lib/runit/sv/agetty-tty4/supervise new file mode 120000 index 0000000..1e70774 --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty4/supervise @@ -0,0 +1 @@ +/run/runit/supervise.agetty-tty4 \ No newline at end of file diff --git a/usr/lib/runit/sv/agetty-tty5/conf b/usr/lib/runit/sv/agetty-tty5/conf new file mode 100755 index 0000000..b9b33c2 --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty5/conf @@ -0,0 +1,9 @@ +if [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux specific settings + if [ "${tty}" = "tty1" ]; then + GETTY_ARGS="--noclear" + fi +fi + +BAUD_RATE=38400 +TERM_NAME=linux diff --git a/usr/lib/runit/sv/agetty-tty5/finish b/usr/lib/runit/sv/agetty-tty5/finish new file mode 100755 index 0000000..f23bb9d --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty5/finish @@ -0,0 +1,3 @@ +#!/bin/sh +tty=${PWD##*-} +exec utmpset -w $tty diff --git a/usr/lib/runit/sv/agetty-tty5/run b/usr/lib/runit/sv/agetty-tty5/run new file mode 100755 index 0000000..41a8cf7 --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty5/run @@ -0,0 +1,16 @@ +#!/bin/sh + +tty=${PWD##*-} + +[ -r conf ] && . ./conf + +if [ -x /sbin/getty -o -x /bin/getty ]; then + # busybox + GETTY=getty +elif [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux + GETTY=agetty +fi + +exec setsid ${GETTY} ${GETTY_ARGS} \ + "${tty}" "${BAUD_RATE}" "${TERM_NAME}" diff --git a/usr/lib/runit/sv/agetty-tty5/supervise b/usr/lib/runit/sv/agetty-tty5/supervise new file mode 120000 index 0000000..a48f96b --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty5/supervise @@ -0,0 +1 @@ +/run/runit/supervise.agetty-tty5 \ No newline at end of file diff --git a/usr/lib/runit/sv/agetty-tty6/conf b/usr/lib/runit/sv/agetty-tty6/conf new file mode 100755 index 0000000..b9b33c2 --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty6/conf @@ -0,0 +1,9 @@ +if [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux specific settings + if [ "${tty}" = "tty1" ]; then + GETTY_ARGS="--noclear" + fi +fi + +BAUD_RATE=38400 +TERM_NAME=linux diff --git a/usr/lib/runit/sv/agetty-tty6/finish b/usr/lib/runit/sv/agetty-tty6/finish new file mode 100755 index 0000000..f23bb9d --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty6/finish @@ -0,0 +1,3 @@ +#!/bin/sh +tty=${PWD##*-} +exec utmpset -w $tty diff --git a/usr/lib/runit/sv/agetty-tty6/run b/usr/lib/runit/sv/agetty-tty6/run new file mode 100755 index 0000000..41a8cf7 --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty6/run @@ -0,0 +1,16 @@ +#!/bin/sh + +tty=${PWD##*-} + +[ -r conf ] && . ./conf + +if [ -x /sbin/getty -o -x /bin/getty ]; then + # busybox + GETTY=getty +elif [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux + GETTY=agetty +fi + +exec setsid ${GETTY} ${GETTY_ARGS} \ + "${tty}" "${BAUD_RATE}" "${TERM_NAME}" diff --git a/usr/lib/runit/sv/agetty-tty6/supervise b/usr/lib/runit/sv/agetty-tty6/supervise new file mode 120000 index 0000000..e9243a6 --- /dev/null +++ b/usr/lib/runit/sv/agetty-tty6/supervise @@ -0,0 +1 @@ +/run/runit/supervise.agetty-tty6 \ No newline at end of file diff --git a/usr/lib/runit/sv/agetty-ttyAMA0/conf b/usr/lib/runit/sv/agetty-ttyAMA0/conf new file mode 100755 index 0000000..e99c38e --- /dev/null +++ b/usr/lib/runit/sv/agetty-ttyAMA0/conf @@ -0,0 +1,8 @@ +GETTY_ARGS="-L" +if [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux specific settings + GETTY_ARGS="${GETTY_ARGS} -8" +fi + +BAUD_RATE=115200 +TERM_NAME=vt100 diff --git a/usr/lib/runit/sv/agetty-ttyAMA0/finish b/usr/lib/runit/sv/agetty-ttyAMA0/finish new file mode 100755 index 0000000..f23bb9d --- /dev/null +++ b/usr/lib/runit/sv/agetty-ttyAMA0/finish @@ -0,0 +1,3 @@ +#!/bin/sh +tty=${PWD##*-} +exec utmpset -w $tty diff --git a/usr/lib/runit/sv/agetty-ttyAMA0/run b/usr/lib/runit/sv/agetty-ttyAMA0/run new file mode 100755 index 0000000..41a8cf7 --- /dev/null +++ b/usr/lib/runit/sv/agetty-ttyAMA0/run @@ -0,0 +1,16 @@ +#!/bin/sh + +tty=${PWD##*-} + +[ -r conf ] && . ./conf + +if [ -x /sbin/getty -o -x /bin/getty ]; then + # busybox + GETTY=getty +elif [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux + GETTY=agetty +fi + +exec setsid ${GETTY} ${GETTY_ARGS} \ + "${tty}" "${BAUD_RATE}" "${TERM_NAME}" diff --git a/usr/lib/runit/sv/agetty-ttyAMA0/supervise b/usr/lib/runit/sv/agetty-ttyAMA0/supervise new file mode 120000 index 0000000..b92ae83 --- /dev/null +++ b/usr/lib/runit/sv/agetty-ttyAMA0/supervise @@ -0,0 +1 @@ +/run/runit/supervise.agetty-ttyAMA0 \ No newline at end of file diff --git a/usr/lib/runit/sv/agetty-ttyS0/conf b/usr/lib/runit/sv/agetty-ttyS0/conf new file mode 100755 index 0000000..e99c38e --- /dev/null +++ b/usr/lib/runit/sv/agetty-ttyS0/conf @@ -0,0 +1,8 @@ +GETTY_ARGS="-L" +if [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux specific settings + GETTY_ARGS="${GETTY_ARGS} -8" +fi + +BAUD_RATE=115200 +TERM_NAME=vt100 diff --git a/usr/lib/runit/sv/agetty-ttyS0/finish b/usr/lib/runit/sv/agetty-ttyS0/finish new file mode 100755 index 0000000..f23bb9d --- /dev/null +++ b/usr/lib/runit/sv/agetty-ttyS0/finish @@ -0,0 +1,3 @@ +#!/bin/sh +tty=${PWD##*-} +exec utmpset -w $tty diff --git a/usr/lib/runit/sv/agetty-ttyS0/run b/usr/lib/runit/sv/agetty-ttyS0/run new file mode 100755 index 0000000..41a8cf7 --- /dev/null +++ b/usr/lib/runit/sv/agetty-ttyS0/run @@ -0,0 +1,16 @@ +#!/bin/sh + +tty=${PWD##*-} + +[ -r conf ] && . ./conf + +if [ -x /sbin/getty -o -x /bin/getty ]; then + # busybox + GETTY=getty +elif [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux + GETTY=agetty +fi + +exec setsid ${GETTY} ${GETTY_ARGS} \ + "${tty}" "${BAUD_RATE}" "${TERM_NAME}" diff --git a/usr/lib/runit/sv/agetty-ttyS0/supervise b/usr/lib/runit/sv/agetty-ttyS0/supervise new file mode 120000 index 0000000..cd9e77f --- /dev/null +++ b/usr/lib/runit/sv/agetty-ttyS0/supervise @@ -0,0 +1 @@ +/run/runit/supervise.agetty-ttyS0 \ No newline at end of file diff --git a/usr/lib/runit/sv/agetty-ttyUSB0/conf b/usr/lib/runit/sv/agetty-ttyUSB0/conf new file mode 100755 index 0000000..e99c38e --- /dev/null +++ b/usr/lib/runit/sv/agetty-ttyUSB0/conf @@ -0,0 +1,8 @@ +GETTY_ARGS="-L" +if [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux specific settings + GETTY_ARGS="${GETTY_ARGS} -8" +fi + +BAUD_RATE=115200 +TERM_NAME=vt100 diff --git a/usr/lib/runit/sv/agetty-ttyUSB0/finish b/usr/lib/runit/sv/agetty-ttyUSB0/finish new file mode 100755 index 0000000..f23bb9d --- /dev/null +++ b/usr/lib/runit/sv/agetty-ttyUSB0/finish @@ -0,0 +1,3 @@ +#!/bin/sh +tty=${PWD##*-} +exec utmpset -w $tty diff --git a/usr/lib/runit/sv/agetty-ttyUSB0/run b/usr/lib/runit/sv/agetty-ttyUSB0/run new file mode 100755 index 0000000..41a8cf7 --- /dev/null +++ b/usr/lib/runit/sv/agetty-ttyUSB0/run @@ -0,0 +1,16 @@ +#!/bin/sh + +tty=${PWD##*-} + +[ -r conf ] && . ./conf + +if [ -x /sbin/getty -o -x /bin/getty ]; then + # busybox + GETTY=getty +elif [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux + GETTY=agetty +fi + +exec setsid ${GETTY} ${GETTY_ARGS} \ + "${tty}" "${BAUD_RATE}" "${TERM_NAME}" diff --git a/usr/lib/runit/sv/agetty-ttyUSB0/supervise b/usr/lib/runit/sv/agetty-ttyUSB0/supervise new file mode 120000 index 0000000..1acc293 --- /dev/null +++ b/usr/lib/runit/sv/agetty-ttyUSB0/supervise @@ -0,0 +1 @@ +/run/runit/supervise.agetty-ttyUSB0 \ No newline at end of file diff --git a/usr/lib/runit/sv/alsa/finish b/usr/lib/runit/sv/alsa/finish new file mode 100755 index 0000000..1439258 --- /dev/null +++ b/usr/lib/runit/sv/alsa/finish @@ -0,0 +1,3 @@ +#!/bin/sh +set -e +exec alsactl store diff --git a/usr/lib/runit/sv/alsa/run b/usr/lib/runit/sv/alsa/run new file mode 100755 index 0000000..be7cbac --- /dev/null +++ b/usr/lib/runit/sv/alsa/run @@ -0,0 +1,5 @@ +#!/bin/sh +exec 2>&1 +set -e +alsactl restore +exec chpst -b alsa pause diff --git a/usr/lib/runit/sv/apache/finish b/usr/lib/runit/sv/apache/finish new file mode 100755 index 0000000..15b7729 --- /dev/null +++ b/usr/lib/runit/sv/apache/finish @@ -0,0 +1,2 @@ +#!/bin/sh +httpd -k graceful-stop diff --git a/usr/lib/runit/sv/apache/run b/usr/lib/runit/sv/apache/run new file mode 100755 index 0000000..6a7eda0 --- /dev/null +++ b/usr/lib/runit/sv/apache/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec httpd -k start -DFOREGROUND diff --git a/usr/lib/runit/sv/apcupsd/run b/usr/lib/runit/sv/apcupsd/run new file mode 100755 index 0000000..7cb0a20 --- /dev/null +++ b/usr/lib/runit/sv/apcupsd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec apcupsd -b diff --git a/usr/lib/runit/sv/at/run b/usr/lib/runit/sv/at/run new file mode 100755 index 0000000..967ced0 --- /dev/null +++ b/usr/lib/runit/sv/at/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec atd -f diff --git a/usr/lib/runit/sv/atftp/run b/usr/lib/runit/sv/atftp/run new file mode 100755 index 0000000..387b041 --- /dev/null +++ b/usr/lib/runit/sv/atftp/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec atftpd --user=atftp.atftp --daemon --no-fork diff --git a/usr/lib/runit/sv/auditctl/conf b/usr/lib/runit/sv/auditctl/conf new file mode 100644 index 0000000..8e157c5 --- /dev/null +++ b/usr/lib/runit/sv/auditctl/conf @@ -0,0 +1,9 @@ +# This option is used to determine if rules & watches should be deleted on +# shutdown by loading the audit-stop file. This is beneficial in most cases +# so that a watch doesn't linger on a drive that is being unmounted. If +# set to no, it will NOT be cleaned up. +AUDITD_CLEAN_STOP="no" + +# This option determines whether or not to call augenrules to compile the +# audit rules from /etc/audit/rules.d. The default is "yes". +USE_AUGENRULES="yes" diff --git a/usr/lib/runit/sv/auditctl/finish b/usr/lib/runit/sv/auditctl/finish new file mode 100755 index 0000000..4d7cce3 --- /dev/null +++ b/usr/lib/runit/sv/auditctl/finish @@ -0,0 +1,13 @@ +#!/bin/sh -e + +# Remove watches so shutdown works cleanly + +test -f /etc/audit/audit-stop.rules || exit 0 +test ! -r ./conf || . ./conf + +case "$AUDITD_CLEAN_STOP" in + no|NO) exit 0 ;; + *) ;; +esac + +exec auditctl -R /etc/audit/audit-stop.rules >/dev/null diff --git a/usr/lib/runit/sv/auditctl/run b/usr/lib/runit/sv/auditctl/run new file mode 100755 index 0000000..64a2820 --- /dev/null +++ b/usr/lib/runit/sv/auditctl/run @@ -0,0 +1,12 @@ +#!/bin/sh -e + +test ! -r ./conf || . ./conf + +case "$USE_AUGENRULES" in + no|NO) ;; + *) test ! -d /etc/audit/rules.d || augenrules >/dev/null ;; +esac + +test ! -f /etc/audit/audit.rules || auditctl -R /etc/audit/audit.rules >/dev/null + +exec chpst -b auditctl pause diff --git a/usr/lib/runit/sv/auditd/run b/usr/lib/runit/sv/auditd/run new file mode 100755 index 0000000..4b5c68a --- /dev/null +++ b/usr/lib/runit/sv/auditd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec auditd -n diff --git a/usr/lib/runit/sv/autologin/conf b/usr/lib/runit/sv/autologin/conf new file mode 100755 index 0000000..b9b33c2 --- /dev/null +++ b/usr/lib/runit/sv/autologin/conf @@ -0,0 +1,9 @@ +if [ -x /sbin/agetty -o -x /bin/agetty ]; then + # util-linux specific settings + if [ "${tty}" = "tty1" ]; then + GETTY_ARGS="--noclear" + fi +fi + +BAUD_RATE=38400 +TERM_NAME=linux diff --git a/usr/lib/runit/sv/autologin/finish b/usr/lib/runit/sv/autologin/finish new file mode 100755 index 0000000..f23bb9d --- /dev/null +++ b/usr/lib/runit/sv/autologin/finish @@ -0,0 +1,3 @@ +#!/bin/sh +tty=${PWD##*-} +exec utmpset -w $tty diff --git a/usr/lib/runit/sv/autologin/run b/usr/lib/runit/sv/autologin/run new file mode 100755 index 0000000..a0c2363 --- /dev/null +++ b/usr/lib/runit/sv/autologin/run @@ -0,0 +1,11 @@ +#!/bin/sh + +tty=${PWD##*-} + +[ -r conf ] && . ./conf + +/usr/bin/getty -8 -J -o -a make ]; then + +exec setsid ${GETTY} ${GETTY_ARGS} \ + "${tty}" "${BAUD_RATE}" "${TERM_NAME}" + diff --git a/usr/lib/runit/sv/autologin/supervise b/usr/lib/runit/sv/autologin/supervise new file mode 120000 index 0000000..a23f48f --- /dev/null +++ b/usr/lib/runit/sv/autologin/supervise @@ -0,0 +1 @@ +/run/runit/supervise.agetty-tty1 \ No newline at end of file diff --git a/usr/lib/runit/sv/avahi-daemon/run b/usr/lib/runit/sv/avahi-daemon/run new file mode 100755 index 0000000..1b76673 --- /dev/null +++ b/usr/lib/runit/sv/avahi-daemon/run @@ -0,0 +1,6 @@ +#!/bin/sh +# if dbus is enabled wait for it. +if [ -e /run/runit/service/dbus ]; then + sv check dbus > /dev/null || exit 1 +fi +exec avahi-daemon -s diff --git a/usr/lib/runit/sv/backlight/finish b/usr/lib/runit/sv/backlight/finish new file mode 100755 index 0000000..f6f7829 --- /dev/null +++ b/usr/lib/runit/sv/backlight/finish @@ -0,0 +1,8 @@ +#!/bin/sh + +[ ! -d /var/cache/backlight ] && mkdir /var/cache/backlight +[ ! -w /var/cache/backlight ] && chmod 755 /var/cache/backlight + +for card in $(find /sys/class/backlight/ -type l); do + cp "/sys/class/backlight/$(basename "$card")/brightness" "/var/cache/backlight/$(basename "$card")-brightness-old" +done diff --git a/usr/lib/runit/sv/backlight/run b/usr/lib/runit/sv/backlight/run new file mode 100755 index 0000000..0c051f8 --- /dev/null +++ b/usr/lib/runit/sv/backlight/run @@ -0,0 +1,8 @@ +#!/bin/sh +for card in $(find /sys/class/backlight/ -type l); do + if [ -r "/var/cache/backlight/$(basename "$card")-brightness-old" ]; then + cp "/var/cache/backlight/$(basename "$card")-brightness-old" "/sys/class/backlight/$(basename "$card")/brightness" + fi +done + +exec chpst -b backlight pause diff --git a/usr/lib/runit/sv/bftpd/run b/usr/lib/runit/sv/bftpd/run new file mode 100755 index 0000000..06464b3 --- /dev/null +++ b/usr/lib/runit/sv/bftpd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec bftpd -D diff --git a/usr/lib/runit/sv/bluetoothd/run b/usr/lib/runit/sv/bluetoothd/run new file mode 100755 index 0000000..5d8676e --- /dev/null +++ b/usr/lib/runit/sv/bluetoothd/run @@ -0,0 +1,3 @@ +#!/bin/sh +sv check dbus >/dev/null || exit 1 +exec /usr/lib/bluetooth/bluetoothd -n >/dev/null diff --git a/usr/lib/runit/sv/boinc/conf b/usr/lib/runit/sv/boinc/conf new file mode 100644 index 0000000..7f8e114 --- /dev/null +++ b/usr/lib/runit/sv/boinc/conf @@ -0,0 +1,11 @@ +# Read default configuration +[ -f /etc/default/boinc-client ] && . /etc/default/boinc-client +# Override with global configuration +[ -f /etc/boinc-client.conf ] && . /etc/boinc-client.conf +BOINCEXE_NAME=${BOINCEXE_NAME:-boinc_client} +BOINCCMD_NAME=${BOINCCMD_NAME:-boinccmd} +BOINCUSER=${BOINCUSER:-boinc} +BOINCDIR=${BOINCDIR:-/var/lib/boinc} +LOGFILE=${LOGFILE:-/var/log/${BOINCEXE_NAME}.log} +ERRORLOG=${ERRORLOG:-/var/log/${BOINCEXE_NAME}_err.log} +OPTS="${BOINCOPTS} --dir ${BOINCDIR}" diff --git a/usr/lib/runit/sv/boinc/run b/usr/lib/runit/sv/boinc/run new file mode 100755 index 0000000..42d136d --- /dev/null +++ b/usr/lib/runit/sv/boinc/run @@ -0,0 +1,8 @@ +#!/bin/sh +[ -r conf ] && . ./conf +[ -d ${BOINCDIR} ] || mkdir -m 755 -p ${BOINCDIR} +[ -f ${LOGFILE} ] || touch ${LOGFILE} +[ -f ${ERRORLOG} ] || touch ${ERRORLOG} +chown --recursive ${BOINCUSER}:${BOINCUSER} ${BOINCDIR} ${LOGFILE} ${ERRORLOG} +exec 2>&1 +exec chpst -u ${BOINCUSER} ${BOINCEXE_NAME} ${OPTS} diff --git a/usr/lib/runit/sv/boltd/run b/usr/lib/runit/sv/boltd/run new file mode 100755 index 0000000..f6cce2e --- /dev/null +++ b/usr/lib/runit/sv/boltd/run @@ -0,0 +1,3 @@ +#!/bin/sh +sv check dbus >/dev/null || exit 1 +exec /usr/lib/boltd >dev/null 2>&1 diff --git a/usr/lib/runit/sv/brltty/run b/usr/lib/runit/sv/brltty/run new file mode 100755 index 0000000..0fd73ec --- /dev/null +++ b/usr/lib/runit/sv/brltty/run @@ -0,0 +1,3 @@ +#!/bin/sh +mkdir -p /run/brltty || exit 1 +exec brltty -n diff --git a/usr/lib/runit/sv/bumblebeed/run b/usr/lib/runit/sv/bumblebeed/run new file mode 100755 index 0000000..a8ee73c --- /dev/null +++ b/usr/lib/runit/sv/bumblebeed/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec bumblebeed --use-syslog diff --git a/usr/lib/runit/sv/chrony/run b/usr/lib/runit/sv/chrony/run new file mode 100755 index 0000000..f587f2b --- /dev/null +++ b/usr/lib/runit/sv/chrony/run @@ -0,0 +1,3 @@ +#!/bin/sh +install -d -m750 -o chrony -g chrony /run/chrony +exec chronyd -n -u chrony diff --git a/usr/lib/runit/sv/clamd/run b/usr/lib/runit/sv/clamd/run new file mode 100755 index 0000000..72f358c --- /dev/null +++ b/usr/lib/runit/sv/clamd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec clamd --foreground=true diff --git a/usr/lib/runit/sv/colord/run b/usr/lib/runit/sv/colord/run new file mode 100755 index 0000000..21d06e0 --- /dev/null +++ b/usr/lib/runit/sv/colord/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -u colord /usr/lib/colord 2>&1 diff --git a/usr/lib/runit/sv/connmand/run b/usr/lib/runit/sv/connmand/run new file mode 100755 index 0000000..e90eed5 --- /dev/null +++ b/usr/lib/runit/sv/connmand/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ -r conf ] && . ./conf +exec connmand -n ${OPTS} diff --git a/usr/lib/runit/sv/consolekit/run b/usr/lib/runit/sv/consolekit/run new file mode 100755 index 0000000..fe4b1d8 --- /dev/null +++ b/usr/lib/runit/sv/consolekit/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec console-kit-daemon --no-daemon --debug diff --git a/usr/lib/runit/sv/consul/run b/usr/lib/runit/sv/consul/run new file mode 100755 index 0000000..021e71b --- /dev/null +++ b/usr/lib/runit/sv/consul/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec consul agent --config-dir=/etc/consul.d diff --git a/usr/lib/runit/sv/coturn/run b/usr/lib/runit/sv/coturn/run new file mode 100755 index 0000000..6d6020c --- /dev/null +++ b/usr/lib/runit/sv/coturn/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -u turnserver:turnserver turnserver -c /etc/turnserver.conf --pidfile /var/tmp/turnserver.pid diff --git a/usr/lib/runit/sv/cpupower/run b/usr/lib/runit/sv/cpupower/run new file mode 100755 index 0000000..7f33ba4 --- /dev/null +++ b/usr/lib/runit/sv/cpupower/run @@ -0,0 +1,15 @@ +#!/bin/sh +[ -r /etc/default/cpupower ] && . /etc/default/cpupower + +# CPU speed +[ "$governor" ] && cpupower frequency-set -g "$governor" +[ "$max_freq" ] && cpupower frequency-set -u "$max_freq" +[ "$min_freq" ] && cpupower frequency-set -d "$min_freq" +[ "$freq" ] && cpupower frequency-set -f "$freq" + +# CPU options +[ "$perf_bias" ] && cpupower set -b "$perf_bias" +[ "$mc_scheduler" ] && cpupower set -m "$mc_scheduler" +[ "$smp_scheduler" ] && cpupower set -s "$smp_scheduler" + +exec chpst -b cpupower pause diff --git a/usr/lib/runit/sv/cronie/run b/usr/lib/runit/sv/cronie/run new file mode 100755 index 0000000..28f1e72 --- /dev/null +++ b/usr/lib/runit/sv/cronie/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec crond -n 2>&1 diff --git a/usr/lib/runit/sv/cupsd/run b/usr/lib/runit/sv/cupsd/run new file mode 100755 index 0000000..d655c5d --- /dev/null +++ b/usr/lib/runit/sv/cupsd/run @@ -0,0 +1,3 @@ +#!/bin/sh +exec 2>&1 +exec cupsd -f diff --git a/usr/lib/runit/sv/darkhttpd/conf b/usr/lib/runit/sv/darkhttpd/conf new file mode 100644 index 0000000..6711677 --- /dev/null +++ b/usr/lib/runit/sv/darkhttpd/conf @@ -0,0 +1,12 @@ +# Specify which port to listen on for connections. (8080 by default) +#PORT=8080 + +# Run darkhttpd as given user/group ('http' by default) +#USER="http" +#GROUP="http" + +# The root of the web directory (/srv/http by default) +#DIR="/srv/http" + +# Custom options (see man darkhttpd for details) +#OPTS="" diff --git a/usr/lib/runit/sv/darkhttpd/log/run b/usr/lib/runit/sv/darkhttpd/log/run new file mode 100755 index 0000000..f9f3765 --- /dev/null +++ b/usr/lib/runit/sv/darkhttpd/log/run @@ -0,0 +1,5 @@ +#!/bin/sh +[ -r ../conf ] && . ../conf +[ ! -d /var/log/darkhttpd ] && mkdir -p /var/log/darkhttpd +[ "$(ls -dl /var/log/darkthtpd | awk '{print $3}')" != ${USER} ] && chown ${USER}:${GROUP} /var/log/darkhttpd +exec chpst -u ${USER}:${GROUP} svlogd -tt /var/log/darkhttpd diff --git a/usr/lib/runit/sv/darkhttpd/run b/usr/lib/runit/sv/darkhttpd/run new file mode 100755 index 0000000..5a2367a --- /dev/null +++ b/usr/lib/runit/sv/darkhttpd/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ -r conf ] && . ./conf +exec chpst -u ${USER:=http}:${GROUP:=http} darkhttpd ${DIR:=/srv/http} --port ${PORT:=8080} ${OPTS} 2>&1 diff --git a/usr/lib/runit/sv/dbus/check b/usr/lib/runit/sv/dbus/check new file mode 100755 index 0000000..ffb1502 --- /dev/null +++ b/usr/lib/runit/sv/dbus/check @@ -0,0 +1,2 @@ +#!/bin/sh +exec dbus-send --system / org.freedesktop.DBus.Peer.Ping >/dev/null 2>&1 diff --git a/usr/lib/runit/sv/dbus/log/run b/usr/lib/runit/sv/dbus/log/run new file mode 100755 index 0000000..ece0651 --- /dev/null +++ b/usr/lib/runit/sv/dbus/log/run @@ -0,0 +1,6 @@ +#!/bin/sh +exec 2>&1; set -e + +[ -d /var/log/dbus ] || install -dm 755 /var/log/dbus + +exec svlogd -tt /var/log/dbus diff --git a/usr/lib/runit/sv/dbus/run b/usr/lib/runit/sv/dbus/run new file mode 100755 index 0000000..edb3c0e --- /dev/null +++ b/usr/lib/runit/sv/dbus/run @@ -0,0 +1,5 @@ +#!/bin/sh +exec 2>&1 +dbus-uuidgen --ensure=/etc/machine-id +[ -d /run/dbus ] || install -m755 -g 81 -o 81 -d /run/dbus +exec dbus-daemon --system --nofork --nopidfile diff --git a/usr/lib/runit/sv/ddclient/run b/usr/lib/runit/sv/ddclient/run new file mode 100755 index 0000000..e77a50d --- /dev/null +++ b/usr/lib/runit/sv/ddclient/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec ddclient -foreground diff --git a/usr/lib/runit/sv/deluge-web/run b/usr/lib/runit/sv/deluge-web/run new file mode 100755 index 0000000..23cd838 --- /dev/null +++ b/usr/lib/runit/sv/deluge-web/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -u deluge deluge-web -d diff --git a/usr/lib/runit/sv/deluged/run b/usr/lib/runit/sv/deluged/run new file mode 100755 index 0000000..5dffc5d --- /dev/null +++ b/usr/lib/runit/sv/deluged/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -u deluge deluged -d diff --git a/usr/lib/runit/sv/dhclient-wlan0/run b/usr/lib/runit/sv/dhclient-wlan0/run new file mode 100755 index 0000000..2ca42d1 --- /dev/null +++ b/usr/lib/runit/sv/dhclient-wlan0/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec dhclient -pf /run/dhclient-wlan0/dhclient.pid -d -4 wlan0 diff --git a/usr/lib/runit/sv/dhclient-wlan0/supervise/lock b/usr/lib/runit/sv/dhclient-wlan0/supervise/lock new file mode 100644 index 0000000..e69de29 diff --git a/usr/lib/runit/sv/dhclient-wlan0/supervise/pid b/usr/lib/runit/sv/dhclient-wlan0/supervise/pid new file mode 100644 index 0000000..e69de29 diff --git a/usr/lib/runit/sv/dhclient-wlan0/supervise/stat b/usr/lib/runit/sv/dhclient-wlan0/supervise/stat new file mode 100644 index 0000000..eb0e904 --- /dev/null +++ b/usr/lib/runit/sv/dhclient-wlan0/supervise/stat @@ -0,0 +1 @@ +down diff --git a/usr/lib/runit/sv/dhclient-wlan0/supervise/status b/usr/lib/runit/sv/dhclient-wlan0/supervise/status new file mode 100644 index 0000000..3ca2321 Binary files /dev/null and b/usr/lib/runit/sv/dhclient-wlan0/supervise/status differ diff --git a/usr/lib/runit/sv/dhclient/run b/usr/lib/runit/sv/dhclient/run new file mode 100755 index 0000000..c23d609 --- /dev/null +++ b/usr/lib/runit/sv/dhclient/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec dhclient -4 -v -d diff --git a/usr/lib/runit/sv/dhcpcd/conf b/usr/lib/runit/sv/dhcpcd/conf new file mode 100644 index 0000000..76866eb --- /dev/null +++ b/usr/lib/runit/sv/dhcpcd/conf @@ -0,0 +1,2 @@ +IFACE="-M" +OPTS="" diff --git a/usr/lib/runit/sv/dhcpcd/run b/usr/lib/runit/sv/dhcpcd/run new file mode 100755 index 0000000..d34dace --- /dev/null +++ b/usr/lib/runit/sv/dhcpcd/run @@ -0,0 +1,4 @@ +#!/bin/sh +exec 2>&1 +[ -r conf ] && . ./conf +exec dhcpcd -B ${OPTS} ${IFACE:=-M} 1>&2 diff --git a/usr/lib/runit/sv/dhcpd4/run b/usr/lib/runit/sv/dhcpd4/run new file mode 100755 index 0000000..4e7f820 --- /dev/null +++ b/usr/lib/runit/sv/dhcpd4/run @@ -0,0 +1,3 @@ +#!/bin/sh +touch /var/lib/dhcp/dhcpd.leases +exec dhcpd -f -4 -q -pf /run/dhcp4.pid diff --git a/usr/lib/runit/sv/dhcpd6/run b/usr/lib/runit/sv/dhcpd6/run new file mode 100755 index 0000000..3e888fb --- /dev/null +++ b/usr/lib/runit/sv/dhcpd6/run @@ -0,0 +1,3 @@ +#!/bin/sh +touch /var/lib/dhcp/dhcpd.leases +exec dhcpd -f -6 -q -pf /run/dhcp6.pid diff --git a/usr/lib/runit/sv/distcc/run b/usr/lib/runit/sv/distcc/run new file mode 100755 index 0000000..f42230e --- /dev/null +++ b/usr/lib/runit/sv/distcc/run @@ -0,0 +1,17 @@ +#!/bin/sh +PROG="distccd" +USER="nobody" +OPTIONS="--no-detach" +OPTIONS="$OPTIONS --daemon" +OPTIONS="$OPTIONS --user $USER" +ALLOW_FILE=/etc/distcc/clients.allow +if [ -f "$ALLOW_FILE" ]; then + ALLOW_OPTIONS=$(sed -e 's/#.*$//' -e '/^\s*$/d' -e 's/^/--allow /' < $ALLOW_FILE) +fi +if [ -z "$ALLOW_OPTIONS" ]; then + # Default to allow localhost + ALLOW_OPTIONS="--allow 127.0.0.1" +fi +OPTIONS="$OPTIONS $ALLOW_OPTIONS" +exec $PROG $OPTIONS + diff --git a/usr/lib/runit/sv/dmeventd/run b/usr/lib/runit/sv/dmeventd/run new file mode 100755 index 0000000..b6dc448 --- /dev/null +++ b/usr/lib/runit/sv/dmeventd/run @@ -0,0 +1,3 @@ +#!/bin/sh +exec 2>&1 +exec dmeventd -f diff --git a/usr/lib/runit/sv/dnscrypt-proxy/log/run b/usr/lib/runit/sv/dnscrypt-proxy/log/run new file mode 100755 index 0000000..8952a7e --- /dev/null +++ b/usr/lib/runit/sv/dnscrypt-proxy/log/run @@ -0,0 +1,6 @@ +#!/bin/sh +[ -e /var/log/dnscrypt-proxy ] || { + mkdir /var/log/dnscrypt-proxy + chown dnscrypt:dnscrypt /var/log/dnscrypt-proxy +} +exec chpst -u dnscrypt:dnscrypt svlogd -t /var/log/dnscrypt-proxy diff --git a/usr/lib/runit/sv/dnscrypt-proxy/run b/usr/lib/runit/sv/dnscrypt-proxy/run new file mode 100755 index 0000000..dc57365 --- /dev/null +++ b/usr/lib/runit/sv/dnscrypt-proxy/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec dnscrypt-proxy -config /etc/dnscrypt-proxy/dnscrypt-proxy.toml 2>&1 diff --git a/usr/lib/runit/sv/dnsmasq/run b/usr/lib/runit/sv/dnsmasq/run new file mode 100755 index 0000000..2b740a4 --- /dev/null +++ b/usr/lib/runit/sv/dnsmasq/run @@ -0,0 +1,3 @@ +#!/bin/sh +mkdir -p /var/lib/misc +exec dnsmasq -k --enable-dbus -u dnsmasq -g dnsmasq 2>&1 diff --git a/usr/lib/runit/sv/docker/log/run b/usr/lib/runit/sv/docker/log/run new file mode 100755 index 0000000..44905fc --- /dev/null +++ b/usr/lib/runit/sv/docker/log/run @@ -0,0 +1,6 @@ +#!/bin/sh +exec 2>&1; set -e + +[ -d /var/log/docker ] || install -dm 755 /var/log/docker + +exec svlogd -tt /var/log/docker diff --git a/usr/lib/runit/sv/docker/run b/usr/lib/runit/sv/docker/run new file mode 100755 index 0000000..08b9577 --- /dev/null +++ b/usr/lib/runit/sv/docker/run @@ -0,0 +1,4 @@ +#!/bin/sh +exec 2>&1; set -e + +exec dockerd diff --git a/usr/lib/runit/sv/doh-client/run b/usr/lib/runit/sv/doh-client/run new file mode 100755 index 0000000..1901619 --- /dev/null +++ b/usr/lib/runit/sv/doh-client/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec doh-client -conf /etc/dns-over-https/doh-client.conf diff --git a/usr/lib/runit/sv/doh-server/run b/usr/lib/runit/sv/doh-server/run new file mode 100755 index 0000000..50d1bd3 --- /dev/null +++ b/usr/lib/runit/sv/doh-server/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec doh-server -conf /etc/dns-over-https/doh-server.conf diff --git a/usr/lib/runit/sv/dovecot/run b/usr/lib/runit/sv/dovecot/run new file mode 100755 index 0000000..67579d2 --- /dev/null +++ b/usr/lib/runit/sv/dovecot/run @@ -0,0 +1,3 @@ +#!/bin/sh +install -d -m 0755 -o root -g root /run/dovecot +exec dovecot -F diff --git a/usr/lib/runit/sv/dropbear/run b/usr/lib/runit/sv/dropbear/run new file mode 100755 index 0000000..954cb4d --- /dev/null +++ b/usr/lib/runit/sv/dropbear/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec dropbear -F -P /run/dropbear.pid -R diff --git a/usr/lib/runit/sv/earlyoom/run b/usr/lib/runit/sv/earlyoom/run new file mode 100755 index 0000000..0d9853e --- /dev/null +++ b/usr/lib/runit/sv/earlyoom/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ -r conf ] && . ./conf +exec earlyoom $EARLYOOM_ARGS diff --git a/usr/lib/runit/sv/ejabberd/run b/usr/lib/runit/sv/ejabberd/run new file mode 100755 index 0000000..8fbfb8e --- /dev/null +++ b/usr/lib/runit/sv/ejabberd/run @@ -0,0 +1,3 @@ +#!/bin/sh -e +export HOME=/var/lib/ejabberd +exec chpst -u jabber ejabberdctl foreground --logs /dev/null 2>&1 diff --git a/usr/lib/runit/sv/espeakup/run b/usr/lib/runit/sv/espeakup/run new file mode 100755 index 0000000..e758d4b --- /dev/null +++ b/usr/lib/runit/sv/espeakup/run @@ -0,0 +1,5 @@ +#!/bin/sh +exec 2>&1 +[ -r conf ] && . ./conf +modprobe speakup_soft start=1 || exit 1 +exec espeakup -d ${OPTS} diff --git a/usr/lib/runit/sv/exim/run b/usr/lib/runit/sv/exim/run new file mode 100755 index 0000000..9faa648 --- /dev/null +++ b/usr/lib/runit/sv/exim/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -uexim exim -bdf -q30m diff --git a/usr/lib/runit/sv/fail2ban/run b/usr/lib/runit/sv/fail2ban/run new file mode 100755 index 0000000..8a13c76 --- /dev/null +++ b/usr/lib/runit/sv/fail2ban/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec fail2ban-server -xf diff --git a/usr/lib/runit/sv/fancontrol/run b/usr/lib/runit/sv/fancontrol/run new file mode 100755 index 0000000..a762479 --- /dev/null +++ b/usr/lib/runit/sv/fancontrol/run @@ -0,0 +1,3 @@ +#!/bin/sh +sv check lm_sensors > /dev/null || exit 1 +exec /usr/bin/fancontrol /etc/fancontrol diff --git a/usr/lib/runit/sv/fcgiwrap/finish b/usr/lib/runit/sv/fcgiwrap/finish new file mode 100755 index 0000000..1c9cbff --- /dev/null +++ b/usr/lib/runit/sv/fcgiwrap/finish @@ -0,0 +1,2 @@ +#!/bin/sh +rm -f /run/fcgiwrap.sock diff --git a/usr/lib/runit/sv/fcgiwrap/run b/usr/lib/runit/sv/fcgiwrap/run new file mode 100755 index 0000000..35ab12f --- /dev/null +++ b/usr/lib/runit/sv/fcgiwrap/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec fcgiwrap -s unix:/run/fcgiwrap.sock 2>&1 diff --git a/usr/lib/runit/sv/fcron/run b/usr/lib/runit/sv/fcron/run new file mode 100755 index 0000000..a3b4afb --- /dev/null +++ b/usr/lib/runit/sv/fcron/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec fcron -f diff --git a/usr/lib/runit/sv/firewalld/run b/usr/lib/runit/sv/firewalld/run new file mode 100755 index 0000000..8e85f23 --- /dev/null +++ b/usr/lib/runit/sv/firewalld/run @@ -0,0 +1,4 @@ +#!/bin/sh +[ -r conf ] && . ./conf +sv start dbus >/dev/null || exit 1 +exec firewalld --nofork --nopid $OPTS 2>&1 diff --git a/usr/lib/runit/sv/fwknopd/run b/usr/lib/runit/sv/fwknopd/run new file mode 100755 index 0000000..9d915cb --- /dev/null +++ b/usr/lib/runit/sv/fwknopd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec fwknopd -f diff --git a/usr/lib/runit/sv/git-daemon/run b/usr/lib/runit/sv/git-daemon/run new file mode 100755 index 0000000..fb2ec99 --- /dev/null +++ b/usr/lib/runit/sv/git-daemon/run @@ -0,0 +1,8 @@ +#!/bin/sh +# This file is based on Debian's runit script file +# (C) 2005-2012 Gerrit Pape +# Licensed under GPL-2 +exec 2>&1 +[ -r conf ] && . ./conf +exec chpst -ugit "$(git --exec-path)"/git-daemon $OPTS \ + --base-path=/srv/git diff --git a/usr/lib/runit/sv/git/git-daemon/log/run b/usr/lib/runit/sv/git/git-daemon/log/run new file mode 100644 index 0000000..2d9e703 --- /dev/null +++ b/usr/lib/runit/sv/git/git-daemon/log/run @@ -0,0 +1,10 @@ +#!/bin/sh +# This file is based on Debian's runit script file +# (C) 2005-2012 Gerrit Pape +# Licensed under GPL-2 +set -e + +LOG=/var/log/git-daemon + +test -d "$LOG" || mkdir -p -m2644 "$LOG" && chown git "$LOG" +exec chpst -ugit svlogd -tt "$LOG" diff --git a/usr/lib/runit/sv/git/git-daemon/run b/usr/lib/runit/sv/git/git-daemon/run new file mode 100755 index 0000000..fb2ec99 --- /dev/null +++ b/usr/lib/runit/sv/git/git-daemon/run @@ -0,0 +1,8 @@ +#!/bin/sh +# This file is based on Debian's runit script file +# (C) 2005-2012 Gerrit Pape +# Licensed under GPL-2 +exec 2>&1 +[ -r conf ] && . ./conf +exec chpst -ugit "$(git --exec-path)"/git-daemon $OPTS \ + --base-path=/srv/git diff --git a/usr/lib/runit/sv/gitea/run b/usr/lib/runit/sv/gitea/run new file mode 100755 index 0000000..12c348d --- /dev/null +++ b/usr/lib/runit/sv/gitea/run @@ -0,0 +1,11 @@ +#!/bin/sh + +if [ ! -f /etc/gitea/gitea.conf ]; then + touch /etc/gitea/gitea.conf + chmod 660 /etc/gitea/gitea.conf + chown gitea:gitea /etc/gitea/gitea.conf +fi + +cd /var/lib/gitea + +USER=gitea HOME=/var/lib/gitea GITEA_WORK_DIR=$HOME exec chpst -u gitea:gitea gitea web --config /etc/gitea/gitea.conf diff --git a/usr/lib/runit/sv/gpm/run b/usr/lib/runit/sv/gpm/run new file mode 100755 index 0000000..1d1a3e7 --- /dev/null +++ b/usr/lib/runit/sv/gpm/run @@ -0,0 +1,3 @@ +#!/bin/sh +exec 1>&2 +exec gpm -D -m /dev/input/mice -t imps2 diff --git a/usr/lib/runit/sv/grafana/run b/usr/lib/runit/sv/grafana/run new file mode 100755 index 0000000..4f73949 --- /dev/null +++ b/usr/lib/runit/sv/grafana/run @@ -0,0 +1,10 @@ +#!/bin/sh + +install -d -m750 -o grafana -g grafana "/var/lib/grafana/conf/provisioning/dashboards" +install -d -m750 -o grafana -g grafana "/var/lib/grafana/conf/provisioning/plugins" +install -d -m750 -o grafana -g grafana "/var/lib/grafana/conf/provisioning/sessions" +install -d -m750 -o grafana -g grafana "/var/lib/grafana/conf/provisioning/datasources" +install -d -m750 -o grafana -g grafana "/var/lib/grafana/conf/provisioning/notifiers" + +exec chpst -u grafana:grafana grafana-server -homepath /usr/share/grafana/ -config /etc/grafana.ini 2>&1 + diff --git a/usr/lib/runit/sv/haveged/run b/usr/lib/runit/sv/haveged/run new file mode 100755 index 0000000..30abcbd --- /dev/null +++ b/usr/lib/runit/sv/haveged/run @@ -0,0 +1,3 @@ +#!/bin/sh +exec 1>&2 +exec haveged -w 1024 -v 1 -F diff --git a/usr/lib/runit/sv/hiawatha/run b/usr/lib/runit/sv/hiawatha/run new file mode 100755 index 0000000..eb962fb --- /dev/null +++ b/usr/lib/runit/sv/hiawatha/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec hiawatha -d diff --git a/usr/lib/runit/sv/hostapd/run b/usr/lib/runit/sv/hostapd/run new file mode 100755 index 0000000..0d17269 --- /dev/null +++ b/usr/lib/runit/sv/hostapd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec hostapd -s /etc/hostapd/hostapd.conf 2>&1 diff --git a/usr/lib/runit/sv/i2pd/run b/usr/lib/runit/sv/i2pd/run new file mode 100755 index 0000000..d53e44a --- /dev/null +++ b/usr/lib/runit/sv/i2pd/run @@ -0,0 +1,5 @@ +#!/bin/sh +exec chpst -ui2pd i2pd \ + --conf=/etc/i2pd/i2pd.conf \ + --tunconf=/etc/i2pd/tunnels.conf \ + --service 2>&1 diff --git a/usr/lib/runit/sv/intel-undervolt/run b/usr/lib/runit/sv/intel-undervolt/run new file mode 100755 index 0000000..d6b1d9c --- /dev/null +++ b/usr/lib/runit/sv/intel-undervolt/run @@ -0,0 +1,3 @@ +#!/bin/sh +intel-undervolt apply >/dev/null 2>&1 +exec chpst -b intel-undervolt pause diff --git a/usr/lib/runit/sv/iptables/run b/usr/lib/runit/sv/iptables/run new file mode 100755 index 0000000..346d7c3 --- /dev/null +++ b/usr/lib/runit/sv/iptables/run @@ -0,0 +1,5 @@ +#!/bin/sh +exec 2>&1 +[ ! -e /etc/iptables/iptables.rules ] && exit 0 +iptables-restore -w 3 /etc/iptables/iptables.rules || exit 1 +exec chpst -b iptables pause diff --git a/usr/lib/runit/sv/iwd/log/run b/usr/lib/runit/sv/iwd/log/run new file mode 100755 index 0000000..4387e60 --- /dev/null +++ b/usr/lib/runit/sv/iwd/log/run @@ -0,0 +1,6 @@ +#!/bin/sh +exec 2>&1; set -e + +[ -d /var/log/iwd ] || install -dm 755 /var/log/iwd + +exec svlogd -tt /var/log/iwd diff --git a/usr/lib/runit/sv/iwd/run b/usr/lib/runit/sv/iwd/run new file mode 100755 index 0000000..ae4417c --- /dev/null +++ b/usr/lib/runit/sv/iwd/run @@ -0,0 +1,6 @@ +#!/bin/sh +set -e + +sv start dbus >/dev/null + +exec /usr/lib/iwd/iwd 2>&1 diff --git a/usr/lib/runit/sv/jenkins/run b/usr/lib/runit/sv/jenkins/run new file mode 100755 index 0000000..05d8a79 --- /dev/null +++ b/usr/lib/runit/sv/jenkins/run @@ -0,0 +1,11 @@ +#!/bin/sh +. /etc/profile +[ -r conf ] && . ./conf + +export JENKINS_USER=jenkins +export JENKINS_HOME=/var/lib/jenkins + +cd / +unset OLDPWD + +exec chpst -u jenkins:${JENKINS_GROUPS:=jenkins} java ${JAVAOPTS:=-Xmx512m} -jar /opt/jenkins/jenkins.war $OPTS diff --git a/usr/lib/runit/sv/kadmind/run b/usr/lib/runit/sv/kadmind/run new file mode 100755 index 0000000..55ccb49 --- /dev/null +++ b/usr/lib/runit/sv/kadmind/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec kadmind -nofork diff --git a/usr/lib/runit/sv/klog/run b/usr/lib/runit/sv/klog/run new file mode 100755 index 0000000..22398ae --- /dev/null +++ b/usr/lib/runit/sv/klog/run @@ -0,0 +1,12 @@ +#!/bin/sh -e + +svname=kernel + +if [ ! -d /var/log/$svname ] +then + mkdir /var/log/$svname + chown root:root /var/log/$svname + chmod 700 /var/log/$svname +fi + +exec < /proc/kmsg svlogd -tt /var/log/$svname diff --git a/usr/lib/runit/sv/knotd/run b/usr/lib/runit/sv/knotd/run new file mode 100755 index 0000000..a1c9482 --- /dev/null +++ b/usr/lib/runit/sv/knotd/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ -r ./conf ] && . ./conf +exec knotd ${OPTS} diff --git a/usr/lib/runit/sv/krb5kdc/run b/usr/lib/runit/sv/krb5kdc/run new file mode 100755 index 0000000..f4d7314 --- /dev/null +++ b/usr/lib/runit/sv/krb5kdc/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec krb5kdc -n diff --git a/usr/lib/runit/sv/libvirtd/log/run b/usr/lib/runit/sv/libvirtd/log/run new file mode 100755 index 0000000..a4cd886 --- /dev/null +++ b/usr/lib/runit/sv/libvirtd/log/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec logger -t libvirtd -p daemon.info diff --git a/usr/lib/runit/sv/libvirtd/run b/usr/lib/runit/sv/libvirtd/run new file mode 100755 index 0000000..a224135 --- /dev/null +++ b/usr/lib/runit/sv/libvirtd/run @@ -0,0 +1,4 @@ +#!/bin/sh +sv check dbus >/dev/null || exit 1 +[ -f ./conf ] && . ./conf +exec libvirtd $OPTS 2>&1 diff --git a/usr/lib/runit/sv/lightdm/run b/usr/lib/runit/sv/lightdm/run new file mode 100755 index 0000000..59be7f2 --- /dev/null +++ b/usr/lib/runit/sv/lightdm/run @@ -0,0 +1,4 @@ +#!/bin/sh +sv check dbus >/dev/null || exit 1 +install -d -m0711 -olightdm -glightdm /run/lightdm +exec lightdm diff --git a/usr/lib/runit/sv/lighttpd/run b/usr/lib/runit/sv/lighttpd/run new file mode 100755 index 0000000..b1d0bb0 --- /dev/null +++ b/usr/lib/runit/sv/lighttpd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec lighttpd-angel -D -f /etc/lighttpd/lighttpd.conf diff --git a/usr/lib/runit/sv/lircd/run b/usr/lib/runit/sv/lircd/run new file mode 100755 index 0000000..70b0f19 --- /dev/null +++ b/usr/lib/runit/sv/lircd/run @@ -0,0 +1,3 @@ +#!/bin/sh + +exec lircd --nodaemon diff --git a/usr/lib/runit/sv/lm_sensors/finish b/usr/lib/runit/sv/lm_sensors/finish new file mode 100755 index 0000000..76139d6 --- /dev/null +++ b/usr/lib/runit/sv/lm_sensors/finish @@ -0,0 +1,3 @@ +#!/bin/sh +[ -r /etc/conf.d/lm_sensors ] && . /etc/conf.d/lm_sensors +exec modprobe -qabr $BUS_MODULES $HWMON_MODULES diff --git a/usr/lib/runit/sv/lm_sensors/run b/usr/lib/runit/sv/lm_sensors/run new file mode 100755 index 0000000..02a71d3 --- /dev/null +++ b/usr/lib/runit/sv/lm_sensors/run @@ -0,0 +1,11 @@ +#!/bin/sh +# Note: Please generate /etc/conf.d/lm_sensors by running sensors-detect + +if [ -r /etc/conf.d/lm_sensors ]; then + . /etc/conf.d/lm_sensors + modprobe -qa $BUS_MODULES $HWMON_MODULES +else + exit 1 +fi + +exec chpst -b lm_sensors pause diff --git a/usr/lib/runit/sv/lxd/run b/usr/lib/runit/sv/lxd/run new file mode 100755 index 0000000..6bce604 --- /dev/null +++ b/usr/lib/runit/sv/lxd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec lxd --group=lxd --logfile=/var/log/lxd/lxd.log 2>&1 diff --git a/usr/lib/runit/sv/lxdm/run b/usr/lib/runit/sv/lxdm/run new file mode 100755 index 0000000..f25827c --- /dev/null +++ b/usr/lib/runit/sv/lxdm/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec lxdm diff --git a/usr/lib/runit/sv/mariadb/run b/usr/lib/runit/sv/mariadb/run new file mode 100755 index 0000000..bc16a07 --- /dev/null +++ b/usr/lib/runit/sv/mariadb/run @@ -0,0 +1,4 @@ +#!/bin/sh +[ ! -d /run/mysqld ] && mkdir -p /run/mysqld +chown mysql:mysql /run/mysqld +exec chpst -u mysql:mysql mysqld --user=mysql 2>&1 diff --git a/usr/lib/runit/sv/matrix-synapse-srv/run b/usr/lib/runit/sv/matrix-synapse-srv/run new file mode 100755 index 0000000..d5506a8 --- /dev/null +++ b/usr/lib/runit/sv/matrix-synapse-srv/run @@ -0,0 +1,3 @@ +#!/bin/sh +cd /var/lib/synapse +exec chpst -u synapse python -m synapse.app.homeserver --config-path=/etc/synapse/homeserver.yaml 2>&1 diff --git a/usr/lib/runit/sv/matterbridge/run b/usr/lib/runit/sv/matterbridge/run new file mode 100755 index 0000000..e3082aa --- /dev/null +++ b/usr/lib/runit/sv/matterbridge/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec matterbridge -conf /etc/matterbridge.toml diff --git a/usr/lib/runit/sv/mdadm/run b/usr/lib/runit/sv/mdadm/run new file mode 100755 index 0000000..b9684b2 --- /dev/null +++ b/usr/lib/runit/sv/mdadm/run @@ -0,0 +1,3 @@ +#!/bin/sh +# --syslog makes it run in every case, yet forwards to mail address if given. +exec mdadm --monitor --scan --syslog diff --git a/usr/lib/runit/sv/metalog/run b/usr/lib/runit/sv/metalog/run new file mode 100755 index 0000000..0f801d1 --- /dev/null +++ b/usr/lib/runit/sv/metalog/run @@ -0,0 +1,4 @@ +#!/bin/sh +exec 1>&2 +[ -r conf ] && . ./conf +exec metalog ${OPTS=-v} diff --git a/usr/lib/runit/sv/minidlnad/run b/usr/lib/runit/sv/minidlnad/run new file mode 100755 index 0000000..e6a8029 --- /dev/null +++ b/usr/lib/runit/sv/minidlnad/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ -r conf ] && . ./conf +exec chpst -u minidlna:minidlna minidlnad -S ${OPTS} 2>&1 diff --git a/usr/lib/runit/sv/minio/run b/usr/lib/runit/sv/minio/run new file mode 100755 index 0000000..d72cf09 --- /dev/null +++ b/usr/lib/runit/sv/minio/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ -r /etc/minio/minio.conf ] && . /etc/minio/minio.conf +exec chpst -uminio minio server ${MINIO_OPTS} ${MINIO_VOLUMES} diff --git a/usr/lib/runit/sv/mopidy/run b/usr/lib/runit/sv/mopidy/run new file mode 100755 index 0000000..b5470ae --- /dev/null +++ b/usr/lib/runit/sv/mopidy/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec mopidy --config /usr/share/mopidy/conf.d:/etc/mopidy/mopidy.conf >/dev/null 2>&1 diff --git a/usr/lib/runit/sv/motion/run b/usr/lib/runit/sv/motion/run new file mode 100755 index 0000000..176d7bc --- /dev/null +++ b/usr/lib/runit/sv/motion/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -u motion motion 2>&1 diff --git a/usr/lib/runit/sv/mpd/run b/usr/lib/runit/sv/mpd/run new file mode 100755 index 0000000..bde3c86 --- /dev/null +++ b/usr/lib/runit/sv/mpd/run @@ -0,0 +1,3 @@ +#!/bin/sh +install -d -m 0755 -o mpd -g mpd /run/mpd +exec mpd --no-daemon diff --git a/usr/lib/runit/sv/murmurd/run b/usr/lib/runit/sv/murmurd/run new file mode 100755 index 0000000..6d28817 --- /dev/null +++ b/usr/lib/runit/sv/murmurd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec murmurd -ini /etc/murmur.ini -fg diff --git a/usr/lib/runit/sv/named/run b/usr/lib/runit/sv/named/run new file mode 100755 index 0000000..1a0e436 --- /dev/null +++ b/usr/lib/runit/sv/named/run @@ -0,0 +1,4 @@ +#!/bin/sh +mkdir -p /run/named || exit 1 +chown named:named /run/named || exit 1 +exec named -u named -f -c /etc/named/named.conf diff --git a/usr/lib/runit/sv/nfs-server/finish b/usr/lib/runit/sv/nfs-server/finish new file mode 100755 index 0000000..7777534 --- /dev/null +++ b/usr/lib/runit/sv/nfs-server/finish @@ -0,0 +1,4 @@ +#!/bin/sh + +exportfs -ua +rpc.nfsd -- 0 diff --git a/usr/lib/runit/sv/nfs-server/run b/usr/lib/runit/sv/nfs-server/run new file mode 100755 index 0000000..fcfa3de --- /dev/null +++ b/usr/lib/runit/sv/nfs-server/run @@ -0,0 +1,34 @@ +#!/bin/sh + +# Make sure the statd service is running. +sv check statd >/dev/null || exit 1 + +# Uncomment and add daemons for kerberos support. +#sv check rpcidmapd >/dev/null || exit 1 +#sv check rpcsvgssd >/dev/null || exit 1 + +# Uncomment and add daemon for pNFS support. +#sv check rpcblkmapd >/dev/null || exit 1 + +# Get the nfs service parameters from the LFS standard file +# this sets some envars. +if [ -e /etc/conf.d/nfs-server.conf ]; then + . /etc/conf.d/nfs-server.conf +fi + +# Check/mount rpc_pipefs (loads sunrpc kernel module) +if ! mountpoint -q /var/lib/nfs/rpc_pipefs; then + mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs -o defaults || exit 1 +fi + +# Check/mount nfsd (loads nfsd kernel module) +if ! mountpoint -q /proc/fs/nfsd; then + mount -t nfsd nfsd /proc/fs/nfsd || exit 1 +fi + +exportfs -ra > /dev/null || exit 1 +rpc.nfsd -- ${PROCESSES:=4} || exit 1 + +sm-notify + +exec rpc.mountd --foreground diff --git a/usr/lib/runit/sv/nftables/finish b/usr/lib/runit/sv/nftables/finish new file mode 100755 index 0000000..c51166a --- /dev/null +++ b/usr/lib/runit/sv/nftables/finish @@ -0,0 +1,3 @@ +#!/bin/sh + +nft flush ruleset diff --git a/usr/lib/runit/sv/nftables/run b/usr/lib/runit/sv/nftables/run new file mode 100755 index 0000000..c8425d3 --- /dev/null +++ b/usr/lib/runit/sv/nftables/run @@ -0,0 +1,4 @@ +#!/bin/sh +[ ! -r /etc/nftables.conf ] && exit 0 +nft -f /etc/nftables.conf +exec chpst -b nftables pause diff --git a/usr/lib/runit/sv/nginx/run b/usr/lib/runit/sv/nginx/run new file mode 100755 index 0000000..05e9182 --- /dev/null +++ b/usr/lib/runit/sv/nginx/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec nginx -g 'daemon off;' diff --git a/usr/lib/runit/sv/ngircd/run b/usr/lib/runit/sv/ngircd/run new file mode 100755 index 0000000..253a0cd --- /dev/null +++ b/usr/lib/runit/sv/ngircd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec ngircd -n diff --git a/usr/lib/runit/sv/nmbd/log/run b/usr/lib/runit/sv/nmbd/log/run new file mode 100755 index 0000000..fb52de5 --- /dev/null +++ b/usr/lib/runit/sv/nmbd/log/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec logger -p daemon.notice -t nmbd diff --git a/usr/lib/runit/sv/nmbd/run b/usr/lib/runit/sv/nmbd/run new file mode 100755 index 0000000..87e7a3c --- /dev/null +++ b/usr/lib/runit/sv/nmbd/run @@ -0,0 +1,3 @@ +#!/bin/sh +mkdir -p /run/samba +exec nmbd -F diff --git a/usr/lib/runit/sv/nscd/run b/usr/lib/runit/sv/nscd/run new file mode 100755 index 0000000..b807785 --- /dev/null +++ b/usr/lib/runit/sv/nscd/run @@ -0,0 +1,4 @@ +#!/bin/sh +[ -r conf ] && . ./conf +mkdir -p /run/nscd /var/db/nscd +exec nscd -F ${OPTS} >/dev/null diff --git a/usr/lib/runit/sv/nsd/run b/usr/lib/runit/sv/nsd/run new file mode 100755 index 0000000..cf709de --- /dev/null +++ b/usr/lib/runit/sv/nsd/run @@ -0,0 +1,7 @@ +#!/bin/sh +if [ ! -f /etc/nsd/nsd.conf ]; then + touch /etc/nsd/nsd.conf + chmod 660 /etc/nsd/nsd.conf + chown nsd:nsd /etc/nsd/nsd.conf +fi +exec nsd -d 2>/dev/null diff --git a/usr/lib/runit/sv/ntp/ntpd/run b/usr/lib/runit/sv/ntp/ntpd/run new file mode 100755 index 0000000..0000347 --- /dev/null +++ b/usr/lib/runit/sv/ntp/ntpd/run @@ -0,0 +1,4 @@ +#!/bin/sh +# Thanks to replabrobin for the network check! +[ "$(ip route | awk '/^default/{print ($3!="")+($5!="")}')" = "2" ] || exit 1 +exec ntpd -g -u ntp:ntp -n >/dev/null 2>&1 diff --git a/usr/lib/runit/sv/ntpd/run b/usr/lib/runit/sv/ntpd/run new file mode 100755 index 0000000..0000347 --- /dev/null +++ b/usr/lib/runit/sv/ntpd/run @@ -0,0 +1,4 @@ +#!/bin/sh +# Thanks to replabrobin for the network check! +[ "$(ip route | awk '/^default/{print ($3!="")+($5!="")}')" = "2" ] || exit 1 +exec ntpd -g -u ntp:ntp -n >/dev/null 2>&1 diff --git a/usr/lib/runit/sv/openfire/run b/usr/lib/runit/sv/openfire/run new file mode 100755 index 0000000..7fe4315 --- /dev/null +++ b/usr/lib/runit/sv/openfire/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec java -server -DopenfireHome=/var/lib/openfire -Dopenfire.lib.dir=/usr/lib/openfire -classpath /usr/lib/openfire/startup.jar -jar /usr/lib/openfire/startup.jar diff --git a/usr/lib/runit/sv/openntpd/log/run b/usr/lib/runit/sv/openntpd/log/run new file mode 100755 index 0000000..68d849e --- /dev/null +++ b/usr/lib/runit/sv/openntpd/log/run @@ -0,0 +1,6 @@ +#!/bin/sh +exec 2>&1; set -e + +[ -d /var/log/openntpd ] || install -dm 755 /var/log/openntpd + +exec svlogd -tt /var/log/openntpd diff --git a/usr/lib/runit/sv/openntpd/run b/usr/lib/runit/sv/openntpd/run new file mode 100755 index 0000000..4dfa775 --- /dev/null +++ b/usr/lib/runit/sv/openntpd/run @@ -0,0 +1,3 @@ +#!/bin/sh +exec 2>&1 +exec ntpd -d 2>&1 diff --git a/usr/lib/runit/sv/opensips/run b/usr/lib/runit/sv/opensips/run new file mode 100755 index 0000000..86a256d --- /dev/null +++ b/usr/lib/runit/sv/opensips/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec opensips -F -f /etc/opensips/opensips.cfg -w /var/tmp -E diff --git a/usr/lib/runit/sv/opensmtpd/run b/usr/lib/runit/sv/opensmtpd/run new file mode 100755 index 0000000..68ecaea --- /dev/null +++ b/usr/lib/runit/sv/opensmtpd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec smtpd -F 2>&1 diff --git a/usr/lib/runit/sv/openvpn/conf b/usr/lib/runit/sv/openvpn/conf new file mode 100644 index 0000000..c37b7c9 --- /dev/null +++ b/usr/lib/runit/sv/openvpn/conf @@ -0,0 +1,2 @@ +# If you have different OpenVPN configuration file, please change it here. +CONF_FILE="/etc/openvpn/openvpn.conf" diff --git a/usr/lib/runit/sv/openvpn/log/run b/usr/lib/runit/sv/openvpn/log/run new file mode 100755 index 0000000..8242752 --- /dev/null +++ b/usr/lib/runit/sv/openvpn/log/run @@ -0,0 +1,6 @@ +#!/bin/sh -e +exec 2>&1 + +[ -d /var/log/openvpn ] || install -dm 755 /var/log/openvpn + +exec svlogd -tt /var/log/openvpn diff --git a/usr/lib/runit/sv/openvpn/run b/usr/lib/runit/sv/openvpn/run new file mode 100755 index 0000000..6285115 --- /dev/null +++ b/usr/lib/runit/sv/openvpn/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ -r conf ] && . ./conf +exec openvpn --config ${CONF_FILE:=/etc/openvpn/openvpn.conf} diff --git a/usr/lib/runit/sv/pcscd/run b/usr/lib/runit/sv/pcscd/run new file mode 100755 index 0000000..99c662d --- /dev/null +++ b/usr/lib/runit/sv/pcscd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec pcscd -f diff --git a/usr/lib/runit/sv/pdnsd/run b/usr/lib/runit/sv/pdnsd/run new file mode 100755 index 0000000..5229501 --- /dev/null +++ b/usr/lib/runit/sv/pdnsd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec pdnsd diff --git a/usr/lib/runit/sv/php-fpm/run b/usr/lib/runit/sv/php-fpm/run new file mode 100755 index 0000000..c9c75b0 --- /dev/null +++ b/usr/lib/runit/sv/php-fpm/run @@ -0,0 +1,3 @@ +#!/bin/sh + +exec php-fpm --nodaemonize diff --git a/usr/lib/runit/sv/postfix/run b/usr/lib/runit/sv/postfix/run new file mode 100755 index 0000000..979b862 --- /dev/null +++ b/usr/lib/runit/sv/postfix/run @@ -0,0 +1,3 @@ +#!/bin/sh +postfix check || exit 1 +exec /usr/lib/postfix/bin/master -d diff --git a/usr/lib/runit/sv/postgresql/conf b/usr/lib/runit/sv/postgresql/conf new file mode 100644 index 0000000..ca2a4d0 --- /dev/null +++ b/usr/lib/runit/sv/postgresql/conf @@ -0,0 +1,17 @@ +# Configuration file for the PostgreSQL server. + +# PostgreSQL's database directory +PGROOT="/var/lib/postgres" + +# PostgreSQL's log file. +PGLOG="/var/log/postgresql.log" + +# Passed to initdb if necessary +INITOPTS="-A peer --auth-host=md5 --auth-local=peer --locale en_US.UTF-8" + +# Extra options to run postmaster with, e.g.: +# -N is the maximal number of client connections +# -B is the number of shared buffers and has to be at least 2x the value for -N +# Please read the man-page to postmaster for more options. Many of these options +# can be set directly in the configuration-file. +#PGOPTS="-N 512 -B 1024" diff --git a/usr/lib/runit/sv/postgresql/log/run b/usr/lib/runit/sv/postgresql/log/run new file mode 100755 index 0000000..e564447 --- /dev/null +++ b/usr/lib/runit/sv/postgresql/log/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec logger -p daemon.info -t postgres diff --git a/usr/lib/runit/sv/postgresql/run b/usr/lib/runit/sv/postgresql/run new file mode 100755 index 0000000..19a0a9e --- /dev/null +++ b/usr/lib/runit/sv/postgresql/run @@ -0,0 +1,25 @@ +#!/bin/sh +[ -r conf ] && . ./conf +: ${PGDATA:="$PGROOT/data"} + +if [ "$PGROOT" != "/var/lib/postgres" ]; then + echo "Creating symlink /var/lib/postgres -> $PGROOT" + + ln -sf "$PGROOT" /var/lib/postgres +fi + + +if [ ! -d "$PGDATA" ]; then + echo "Initializing database in $PGDATA" + + mkdir -p "$PGDATA" + chown -R postgres:postgres "$PGDATA" + chmod 0700 "$PGDATA" + su - postgres -m -c "/usr/bin/initdb $INITOPTS -D '$PGDATA'" >/dev/null + + if [ -f /etc/postgresql/postgresql.conf ]; then + ln -sf /etc/postgresql/postgresql.conf "$PGDATA/postgresql.conf" + fi +fi + +exec chpst -u postgres:postgres postgres -D "$PGDATA" $PGOPTS 2>&1 diff --git a/usr/lib/runit/sv/postgrey/run b/usr/lib/runit/sv/postgrey/run new file mode 100755 index 0000000..9aa48ad --- /dev/null +++ b/usr/lib/runit/sv/postgrey/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec /usr/bin/postgrey --inet=127.0.0.1:10030 --user=postgrey --group=postgrey --greylist-text="Greylisted for %%s seconds" diff --git a/usr/lib/runit/sv/powerdns-recursor/run b/usr/lib/runit/sv/powerdns-recursor/run new file mode 100755 index 0000000..8f043f1 --- /dev/null +++ b/usr/lib/runit/sv/powerdns-recursor/run @@ -0,0 +1,8 @@ +#!/bin/sh + +if [ ! -d /run/pdns-recursor ]; then + install -dm755 -o pdns-recursor -g pdns-recursor /run/pdns-recursor +fi + +exec sh -c "/usr/bin/pdns_recursor --setuid=pdns-recursor --daemon=no --disable-syslog=yes --write-pid=no --config-dir=/etc/powerdns --socket-dir=/run/pdns-recursor" + diff --git a/usr/lib/runit/sv/pptpd/run b/usr/lib/runit/sv/pptpd/run new file mode 100755 index 0000000..2399cab --- /dev/null +++ b/usr/lib/runit/sv/pptpd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec pptpd -c /etc/pptpd.conf -p /run/pptpd.pid -f diff --git a/usr/lib/runit/sv/privoxy/log/run b/usr/lib/runit/sv/privoxy/log/run new file mode 100755 index 0000000..4923ee6 --- /dev/null +++ b/usr/lib/runit/sv/privoxy/log/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec logger -t privoxy diff --git a/usr/lib/runit/sv/privoxy/run b/usr/lib/runit/sv/privoxy/run new file mode 100755 index 0000000..120ca2a --- /dev/null +++ b/usr/lib/runit/sv/privoxy/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -u privoxy:privoxy privoxy --no-daemon /etc/privoxy/config 2>&1 diff --git a/usr/lib/runit/sv/prometheus/run b/usr/lib/runit/sv/prometheus/run new file mode 100755 index 0000000..97b9d41 --- /dev/null +++ b/usr/lib/runit/sv/prometheus/run @@ -0,0 +1,9 @@ +#!/bin/sh + +[ -f ./conf ] && . ./conf + +: ${WRKDIR:=/var/lib/prometheus} + +cd "${WRKDIR}" + +exec chpst -u prometheus prometheus --config.file=/etc/prometheus/prometheus.yml $ARGS diff --git a/usr/lib/runit/sv/prosody/run b/usr/lib/runit/sv/prosody/run new file mode 100755 index 0000000..a257a3a --- /dev/null +++ b/usr/lib/runit/sv/prosody/run @@ -0,0 +1,4 @@ +#!/bin/sh +chown prosody:jabber /var/lib/prosody +sed -i 's/daemonize = true/daemonize = false/' /etc/prosody/prosody.cfg.lua +exec chpst -u prosody:jabber prosody diff --git a/usr/lib/runit/sv/qemu-guest-agent/run b/usr/lib/runit/sv/qemu-guest-agent/run new file mode 100755 index 0000000..040db9c --- /dev/null +++ b/usr/lib/runit/sv/qemu-guest-agent/run @@ -0,0 +1,8 @@ +#!/bin/sh + +GA_METHOD=virtio-serial +GA_PATH=/dev/virtio-ports/org.qemu.guest_agent.0 + +exec /usr/bin/qemu-ga -- -m virtio-serial -p /dev/virtio-ports/org.qemu.guest_agent.0 \ + -l /var/log/qemu-ga.log -d -f /run/qemu-ga.pid -t /run + diff --git a/usr/lib/runit/sv/radicale/run b/usr/lib/runit/sv/radicale/run new file mode 100755 index 0000000..b0fc1f0 --- /dev/null +++ b/usr/lib/runit/sv/radicale/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec radicale -f diff --git a/usr/lib/runit/sv/radiusd/run b/usr/lib/runit/sv/radiusd/run new file mode 100755 index 0000000..9098b19 --- /dev/null +++ b/usr/lib/runit/sv/radiusd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec radiusd -f diff --git a/usr/lib/runit/sv/redis/run b/usr/lib/runit/sv/redis/run new file mode 100755 index 0000000..9ce7366 --- /dev/null +++ b/usr/lib/runit/sv/redis/run @@ -0,0 +1,3 @@ +#!/bin/sh +install -d -m0750 -o redis -g redis /run/redis +exec chpst -u redis:redis redis-server /etc/redis/redis.conf > /dev/null diff --git a/usr/lib/runit/sv/relaysrv/log/run b/usr/lib/runit/sv/relaysrv/log/run new file mode 100755 index 0000000..b1d5a28 --- /dev/null +++ b/usr/lib/runit/sv/relaysrv/log/run @@ -0,0 +1,3 @@ +#!/bin/sh + +exec svlogd /var/log/relaysrv diff --git a/usr/lib/runit/sv/relaysrv/run b/usr/lib/runit/sv/relaysrv/run new file mode 100755 index 0000000..952bfc7 --- /dev/null +++ b/usr/lib/runit/sv/relaysrv/run @@ -0,0 +1,6 @@ +#!/bin/sh + +[ -r conf ] && . ./conf + +exec 2>&1 +exec chpst -u syncthing-relaysrv strelaysrv -keys=/var/lib/relaysrv $RELAY_ARGS diff --git a/usr/lib/runit/sv/rngd/run b/usr/lib/runit/sv/rngd/run new file mode 100755 index 0000000..dbccf99 --- /dev/null +++ b/usr/lib/runit/sv/rngd/run @@ -0,0 +1,5 @@ +#!/bin/sh +RNGD_OPTS="" +[ -r conf ] && . ./conf + +exec rngd $RNGD_OPTS -f diff --git a/usr/lib/runit/sv/rpcbind/run b/usr/lib/runit/sv/rpcbind/run new file mode 100755 index 0000000..65fab4d --- /dev/null +++ b/usr/lib/runit/sv/rpcbind/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec rpcbind -f diff --git a/usr/lib/runit/sv/rspamd/run b/usr/lib/runit/sv/rspamd/run new file mode 100755 index 0000000..809c77f --- /dev/null +++ b/usr/lib/runit/sv/rspamd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -u rspamd rspamd -c /etc/rspamd/rspamd.conf -f diff --git a/usr/lib/runit/sv/rsyncd/run b/usr/lib/runit/sv/rsyncd/run new file mode 100755 index 0000000..5a7d495 --- /dev/null +++ b/usr/lib/runit/sv/rsyncd/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ ! -e /etc/rsyncd.conf ] && exit 1 +exec rsync --daemon --no-detach diff --git a/usr/lib/runit/sv/salt-api/run b/usr/lib/runit/sv/salt-api/run new file mode 100755 index 0000000..0748970 --- /dev/null +++ b/usr/lib/runit/sv/salt-api/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec salt-api diff --git a/usr/lib/runit/sv/salt-master/run b/usr/lib/runit/sv/salt-master/run new file mode 100755 index 0000000..928cc01 --- /dev/null +++ b/usr/lib/runit/sv/salt-master/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec salt-master diff --git a/usr/lib/runit/sv/salt-minion/run b/usr/lib/runit/sv/salt-minion/run new file mode 100755 index 0000000..e9b71af --- /dev/null +++ b/usr/lib/runit/sv/salt-minion/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec salt-minion diff --git a/usr/lib/runit/sv/salt-syndic/run b/usr/lib/runit/sv/salt-syndic/run new file mode 100755 index 0000000..80950ef --- /dev/null +++ b/usr/lib/runit/sv/salt-syndic/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec salt-syndic diff --git a/usr/lib/runit/sv/saned/run b/usr/lib/runit/sv/saned/run new file mode 100755 index 0000000..8201170 --- /dev/null +++ b/usr/lib/runit/sv/saned/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec saned -s diff --git a/usr/lib/runit/sv/saslauthd/conf b/usr/lib/runit/sv/saslauthd/conf new file mode 100644 index 0000000..1672112 --- /dev/null +++ b/usr/lib/runit/sv/saslauthd/conf @@ -0,0 +1 @@ +SASLAUTHD_OPTS="-a pam" diff --git a/usr/lib/runit/sv/saslauthd/run b/usr/lib/runit/sv/saslauthd/run new file mode 100755 index 0000000..830591f --- /dev/null +++ b/usr/lib/runit/sv/saslauthd/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ -r conf ] && . ./conf +exec saslauthd -d diff --git a/usr/lib/runit/sv/seatd/run b/usr/lib/runit/sv/seatd/run new file mode 100755 index 0000000..5dc44e9 --- /dev/null +++ b/usr/lib/runit/sv/seatd/run @@ -0,0 +1,4 @@ +#!/bin/sh +exec 2>&1 +sv check dbus >/dev/null || exit 1 +exec /usr/bin/seatd -g video diff --git a/usr/lib/runit/sv/shairplay/conf b/usr/lib/runit/sv/shairplay/conf new file mode 100644 index 0000000..565860f --- /dev/null +++ b/usr/lib/runit/sv/shairplay/conf @@ -0,0 +1,2 @@ +SHAIRPLAY_NAME="shairplay" +#SHAIRPLAY_PASSWORD="" diff --git a/usr/lib/runit/sv/shairplay/run b/usr/lib/runit/sv/shairplay/run new file mode 100755 index 0000000..339c91b --- /dev/null +++ b/usr/lib/runit/sv/shairplay/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ -r conf ] && . ./conf +exec shairplay -a "${SHAIRPLAY_NAME}" "${SHAIRPLAY_PASSWORD}" diff --git a/usr/lib/runit/sv/shairport-sync/run b/usr/lib/runit/sv/shairport-sync/run new file mode 100755 index 0000000..b287400 --- /dev/null +++ b/usr/lib/runit/sv/shairport-sync/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -u shairport-sync shairport-sync diff --git a/usr/lib/runit/sv/slapd/run b/usr/lib/runit/sv/slapd/run new file mode 100755 index 0000000..f7addfc --- /dev/null +++ b/usr/lib/runit/sv/slapd/run @@ -0,0 +1,10 @@ +#!/bin/sh +[ -r ./conf ] && . ./conf +: ${LDAPUSER:=ldap} +: ${LDAPGROUP:=ldap} +if [ ! -d /run/openldap ]; then + mkdir /run/openldap + chown $LDAPUSER:$LDAPGROUP /run/openldap +fi +exec 2>&1 +exec slapd -u $LDAPUSER -g $LDAPGROUP -d 0 diff --git a/usr/lib/runit/sv/slim/run b/usr/lib/runit/sv/slim/run new file mode 100755 index 0000000..765580b --- /dev/null +++ b/usr/lib/runit/sv/slim/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec slim -nodaemon diff --git a/usr/lib/runit/sv/smbd/log/run b/usr/lib/runit/sv/smbd/log/run new file mode 100755 index 0000000..3131489 --- /dev/null +++ b/usr/lib/runit/sv/smbd/log/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec logger -p daemon.notice -t smbd diff --git a/usr/lib/runit/sv/smbd/run b/usr/lib/runit/sv/smbd/run new file mode 100755 index 0000000..a0ac598 --- /dev/null +++ b/usr/lib/runit/sv/smbd/run @@ -0,0 +1,3 @@ +#!/bin/sh +mkdir -p /run/samba +exec smbd -F diff --git a/usr/lib/runit/sv/sndio/log/run b/usr/lib/runit/sv/sndio/log/run new file mode 100755 index 0000000..4472c76 --- /dev/null +++ b/usr/lib/runit/sv/sndio/log/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec logger -t sndiod diff --git a/usr/lib/runit/sv/sndio/run b/usr/lib/runit/sv/sndio/run new file mode 100755 index 0000000..8b4bb8d --- /dev/null +++ b/usr/lib/runit/sv/sndio/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ -r conf ] && . ./conf +exec sndiod ${OPTS} -d 2>&1 diff --git a/usr/lib/runit/sv/socklog/check b/usr/lib/runit/sv/socklog/check new file mode 100755 index 0000000..4c61abd --- /dev/null +++ b/usr/lib/runit/sv/socklog/check @@ -0,0 +1,3 @@ +#!/bin/sh +exec 2>/dev/null +exec socklog-check unix /dev/log diff --git a/usr/lib/runit/sv/socklog/log/run b/usr/lib/runit/sv/socklog/log/run new file mode 100755 index 0000000..e62e3bb --- /dev/null +++ b/usr/lib/runit/sv/socklog/log/run @@ -0,0 +1,8 @@ +#!/bin/sh +if [ ! -d /var/log/socklog ]; then + for folder in cron daemon debug errors everything lpr \ + mail messages remote-udp secure tty12 user ;do + mkdir -p /var/log/socklog/$folder + done +fi +exec chpst -uroot svlogd /var/log/socklog/* diff --git a/usr/lib/runit/sv/socklog/run b/usr/lib/runit/sv/socklog/run new file mode 100755 index 0000000..b2a7096 --- /dev/null +++ b/usr/lib/runit/sv/socklog/run @@ -0,0 +1,3 @@ +#!/bin/sh +exec 2>&1 +exec chpst -Uroot socklog unix /dev/log diff --git a/usr/lib/runit/sv/spamd/run b/usr/lib/runit/sv/spamd/run new file mode 100755 index 0000000..663cd87 --- /dev/null +++ b/usr/lib/runit/sv/spamd/run @@ -0,0 +1,9 @@ +#!/bin/sh +[ -r conf ] && . ./conf +if [ ! -d /etc/mail/sa-update-keys ] ; then + mkdir /etc/mail/sa-update-keys + chown -R spamd:spamd /etc/mail + chown -R spamd:spamd /var/lib/spamassassin + exec chpst -u spamd:spamd /usr/bin/vendor_perl/sa-update +fi +exec /usr/bin/vendor_perl/spamd ${OPTS} diff --git a/usr/lib/runit/sv/spice-vdagentd/run b/usr/lib/runit/sv/spice-vdagentd/run new file mode 100755 index 0000000..98b0f48 --- /dev/null +++ b/usr/lib/runit/sv/spice-vdagentd/run @@ -0,0 +1,5 @@ +#!/bin/sh +[ -r conf ] && . ./conf +sv check dbus >/dev/null || exit 1 +mkdir -p /run/spice-vdagentd +exec /usr/bin/spice-vdagentd -x -X $SPICE_VDAGENTD_EXTRA_ARGS diff --git a/usr/lib/runit/sv/spotifyd/run b/usr/lib/runit/sv/spotifyd/run new file mode 100755 index 0000000..1d9a99d --- /dev/null +++ b/usr/lib/runit/sv/spotifyd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec spotifyd --no-daemon diff --git a/usr/lib/runit/sv/squid/run b/usr/lib/runit/sv/squid/run new file mode 100755 index 0000000..6202811 --- /dev/null +++ b/usr/lib/runit/sv/squid/run @@ -0,0 +1,4 @@ +#!/bin/sh -e +install -o squid -g squid -m 0755 -d /run/squid +squid -N -s -z +exec squid -N -s diff --git a/usr/lib/runit/sv/ssh/run b/usr/lib/runit/sv/ssh/run new file mode 100755 index 0000000..b5e744a --- /dev/null +++ b/usr/lib/runit/sv/ssh/run @@ -0,0 +1,4 @@ +#!/bin/sh +ssh-keygen -A >/dev/null 2>&1 # Will generate host keys if they don't already exist +[ -r conf ] && . ./conf +exec /usr/bin/sshd -D $OPTS diff --git a/usr/lib/runit/sv/ssh/supervise/lock b/usr/lib/runit/sv/ssh/supervise/lock new file mode 100644 index 0000000..e69de29 diff --git a/usr/lib/runit/sv/ssh/supervise/pid b/usr/lib/runit/sv/ssh/supervise/pid new file mode 100644 index 0000000..e69de29 diff --git a/usr/lib/runit/sv/ssh/supervise/stat b/usr/lib/runit/sv/ssh/supervise/stat new file mode 100644 index 0000000..eb0e904 --- /dev/null +++ b/usr/lib/runit/sv/ssh/supervise/stat @@ -0,0 +1 @@ +down diff --git a/usr/lib/runit/sv/ssh/supervise/status b/usr/lib/runit/sv/ssh/supervise/status new file mode 100644 index 0000000..e39785b Binary files /dev/null and b/usr/lib/runit/sv/ssh/supervise/status differ diff --git a/usr/lib/runit/sv/sshd/run b/usr/lib/runit/sv/sshd/run new file mode 100755 index 0000000..a359437 --- /dev/null +++ b/usr/lib/runit/sv/sshd/run @@ -0,0 +1,5 @@ +#!/bin/sh +exec 2>&1 +ssh-keygen -A >/dev/null 2>&1 # Will generate host keys if they don't already exist +[ -r conf ] && . ./conf +exec /usr/bin/sshd -D $OPTS diff --git a/usr/lib/runit/sv/sshguard-socklog/run b/usr/lib/runit/sv/sshguard-socklog/run new file mode 100755 index 0000000..746df48 --- /dev/null +++ b/usr/lib/runit/sv/sshguard-socklog/run @@ -0,0 +1,14 @@ +#!/bin/sh + +# Defaults that mabe be overridden (or erased entirely) by configuration +LOGFILE="${LOGFILE:-/var/log/socklog/secure/current}" +BLACKLIST_SPEC="${BLACKLIST_SPEC:-200:/var/db/sshguard/blacklist.db}" + +# Allow the firewall and logger backends to be specified +[ -f ./conf ] && . ./conf + +# If specified, add blacklist spec and log source to OPTS +[ -n "$BLACKLIST_SPEC" ] && OPTS="-b $BLACKLIST_SPEC" +[ -n "$LOGFILE" ] && OPTS="-l $LOGFILE $OPTS" + +exec sshguard $OPTS 2>&1 diff --git a/usr/lib/runit/sv/sslh/run b/usr/lib/runit/sv/sslh/run new file mode 100755 index 0000000..916d84a --- /dev/null +++ b/usr/lib/runit/sv/sslh/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec sslh -f -u nobody -F /etc/sslh.cfg diff --git a/usr/lib/runit/sv/statd/run b/usr/lib/runit/sv/statd/run new file mode 100755 index 0000000..66900a3 --- /dev/null +++ b/usr/lib/runit/sv/statd/run @@ -0,0 +1,9 @@ +#!/bin/sh + +# Make sure the portmap service is running. +sv check rpcbind >/dev/null || exit 1 + +# Load nfs module +modprobe nfs || exit 1 + +exec rpc.statd -F -d -L diff --git a/usr/lib/runit/sv/sthttpd/run b/usr/lib/runit/sv/sthttpd/run new file mode 100755 index 0000000..5d28769 --- /dev/null +++ b/usr/lib/runit/sv/sthttpd/run @@ -0,0 +1,2 @@ +#!/bin/sh -e +exec thttpd -D -C /etc/thttpd.conf diff --git a/usr/lib/runit/sv/strongswan/run b/usr/lib/runit/sv/strongswan/run new file mode 100755 index 0000000..16b6a93 --- /dev/null +++ b/usr/lib/runit/sv/strongswan/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec ipsec start --nofork diff --git a/usr/lib/runit/sv/stubby/run b/usr/lib/runit/sv/stubby/run new file mode 100755 index 0000000..b8860f5 --- /dev/null +++ b/usr/lib/runit/sv/stubby/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -u stubby stubby diff --git a/usr/lib/runit/sv/stunnel/run b/usr/lib/runit/sv/stunnel/run new file mode 100755 index 0000000..acecbf4 --- /dev/null +++ b/usr/lib/runit/sv/stunnel/run @@ -0,0 +1,12 @@ +#!/bin/sh -e + +if [ ! -f /etc/stunnel/stunnel.conf ]; then + cp /etc/stunnel/stunnel.conf-sample /etc/stunnel/stunnel.conf + sed -i 's/;setuid/setuid/' /etc/stunnel/stunnel.conf + sed -i 's/;setgid/setgid/' /etc/stunnel/stunnel.conf + sed -i 's/;foreground/foreground/' /etc/stunnel/stunnel.conf +elif grep -q ";foreground" stunnel.conf; then + sed -i 's/;foreground/foreground/' /etc/stunnel/stunnel.conf +fi + +exec stunnel 2>&1 diff --git a/usr/lib/runit/sv/svnserve/run b/usr/lib/runit/sv/svnserve/run new file mode 100755 index 0000000..7f512e0 --- /dev/null +++ b/usr/lib/runit/sv/svnserve/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ -r conf ] && . ./conf +exec svnserve -d --foreground $OPTS diff --git a/usr/lib/runit/sv/swap-runit/finish b/usr/lib/runit/sv/swap-runit/finish new file mode 100644 index 0000000..9200047 --- /dev/null +++ b/usr/lib/runit/sv/swap-runit/finish @@ -0,0 +1,2 @@ +#!/bin/sh +exec runit-swap stop diff --git a/usr/lib/runit/sv/swap-runit/run b/usr/lib/runit/sv/swap-runit/run new file mode 100755 index 0000000..e5c72b8 --- /dev/null +++ b/usr/lib/runit/sv/swap-runit/run @@ -0,0 +1,3 @@ +#!/bin/sh +runit-swap start +exec pause diff --git a/usr/lib/runit/sv/swap-runit/supervise/lock b/usr/lib/runit/sv/swap-runit/supervise/lock new file mode 100644 index 0000000..e69de29 diff --git a/usr/lib/runit/sv/swap-runit/supervise/pid b/usr/lib/runit/sv/swap-runit/supervise/pid new file mode 100644 index 0000000..053a342 --- /dev/null +++ b/usr/lib/runit/sv/swap-runit/supervise/pid @@ -0,0 +1 @@ +5462 diff --git a/usr/lib/runit/sv/swap-runit/supervise/stat b/usr/lib/runit/sv/swap-runit/supervise/stat new file mode 100644 index 0000000..f5bdd21 --- /dev/null +++ b/usr/lib/runit/sv/swap-runit/supervise/stat @@ -0,0 +1 @@ +run diff --git a/usr/lib/runit/sv/swap-runit/supervise/status b/usr/lib/runit/sv/swap-runit/supervise/status new file mode 100644 index 0000000..c8ff826 Binary files /dev/null and b/usr/lib/runit/sv/swap-runit/supervise/status differ diff --git a/usr/lib/runit/sv/syncthing/conf b/usr/lib/runit/sv/syncthing/conf new file mode 100644 index 0000000..349ed50 --- /dev/null +++ b/usr/lib/runit/sv/syncthing/conf @@ -0,0 +1 @@ +USER="root" diff --git a/usr/lib/runit/sv/syncthing/log/run b/usr/lib/runit/sv/syncthing/log/run new file mode 100755 index 0000000..6aaeba3 --- /dev/null +++ b/usr/lib/runit/sv/syncthing/log/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec logger -t syncthing diff --git a/usr/lib/runit/sv/syncthing/run b/usr/lib/runit/sv/syncthing/run new file mode 100755 index 0000000..716ce2f --- /dev/null +++ b/usr/lib/runit/sv/syncthing/run @@ -0,0 +1,5 @@ +#!/bin/sh +[ -r conf ] && . ./conf + +exec 2>&1 +exec chpst -u "$USER" syncthing -logflags 0 diff --git a/usr/lib/runit/sv/syslog-ng/run b/usr/lib/runit/sv/syslog-ng/run new file mode 100755 index 0000000..d9fcf24 --- /dev/null +++ b/usr/lib/runit/sv/syslog-ng/run @@ -0,0 +1,5 @@ +#!/bin/sh + +echo $$ > /run/syslog-ng.pid +exec 2>&1 +exec syslog-ng -F diff --git a/usr/lib/runit/sv/thermald/run b/usr/lib/runit/sv/thermald/run new file mode 100755 index 0000000..4df7dd4 --- /dev/null +++ b/usr/lib/runit/sv/thermald/run @@ -0,0 +1,3 @@ +#!/bin/sh +sv check dbus >/dev/null || exit 1 +exec thermald --no-daemon --dbus-enable 1>&2 diff --git a/usr/lib/runit/sv/tinydns/run b/usr/lib/runit/sv/tinydns/run new file mode 100755 index 0000000..c1f2d52 --- /dev/null +++ b/usr/lib/runit/sv/tinydns/run @@ -0,0 +1,3 @@ +#!/bin/sh +exec tinydns + diff --git a/usr/lib/runit/sv/tlp/finish b/usr/lib/runit/sv/tlp/finish new file mode 100755 index 0000000..d210ad6 --- /dev/null +++ b/usr/lib/runit/sv/tlp/finish @@ -0,0 +1,2 @@ +#!/bin/sh +exec tlp init stop diff --git a/usr/lib/runit/sv/tlp/run b/usr/lib/runit/sv/tlp/run new file mode 100755 index 0000000..552c2e7 --- /dev/null +++ b/usr/lib/runit/sv/tlp/run @@ -0,0 +1,4 @@ +#!/bin/sh +exec 1>&2 +tlp init start || exit 1 +exec chpst -b tlp pause diff --git a/usr/lib/runit/sv/tor/run b/usr/lib/runit/sv/tor/run new file mode 100755 index 0000000..315befc --- /dev/null +++ b/usr/lib/runit/sv/tor/run @@ -0,0 +1,5 @@ +#!/bin/sh +exec 2>&1 +[ -r conf ] && . ./conf +ulimit -n ${MAX_OPEN_FILES:-65536} +exec tor ${OPTS:=--quiet} --runasdaemon 0 2>&1 diff --git a/usr/lib/runit/sv/toxbootstrapd/run b/usr/lib/runit/sv/toxbootstrapd/run new file mode 100755 index 0000000..16e922f --- /dev/null +++ b/usr/lib/runit/sv/toxbootstrapd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -u tox-bootstrapd:tox-bootstrapd tox-bootstrapd --foreground --config /etc/tox-bootstrapd.conf diff --git a/usr/lib/runit/sv/toxcore/toxbootstrapd/run b/usr/lib/runit/sv/toxcore/toxbootstrapd/run new file mode 100755 index 0000000..16e922f --- /dev/null +++ b/usr/lib/runit/sv/toxcore/toxbootstrapd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -u tox-bootstrapd:tox-bootstrapd tox-bootstrapd --foreground --config /etc/tox-bootstrapd.conf diff --git a/usr/lib/runit/sv/transmission-daemon/run b/usr/lib/runit/sv/transmission-daemon/run new file mode 100755 index 0000000..07e3935 --- /dev/null +++ b/usr/lib/runit/sv/transmission-daemon/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -u transmission:transmission transmission-daemon -f --log-error diff --git a/usr/lib/runit/sv/trojan/run b/usr/lib/runit/sv/trojan/run new file mode 100755 index 0000000..f6bc776 --- /dev/null +++ b/usr/lib/runit/sv/trojan/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec trojan /etc/trojan/config.json diff --git a/usr/lib/runit/sv/udevd/finish b/usr/lib/runit/sv/udevd/finish new file mode 100755 index 0000000..ae5abba --- /dev/null +++ b/usr/lib/runit/sv/udevd/finish @@ -0,0 +1,2 @@ +#!/bin/sh +[ -S /run/udev/control ] && rm -f /run/udev/control diff --git a/usr/lib/runit/sv/udevd/run b/usr/lib/runit/sv/udevd/run new file mode 100755 index 0000000..b6af85e --- /dev/null +++ b/usr/lib/runit/sv/udevd/run @@ -0,0 +1,4 @@ +#!/bin/sh +exec 2>&1 +udevadm control --exit +exec udevd diff --git a/usr/lib/runit/sv/udevd/supervise/lock b/usr/lib/runit/sv/udevd/supervise/lock new file mode 100644 index 0000000..e69de29 diff --git a/usr/lib/runit/sv/udevd/supervise/pid b/usr/lib/runit/sv/udevd/supervise/pid new file mode 100644 index 0000000..8966a60 --- /dev/null +++ b/usr/lib/runit/sv/udevd/supervise/pid @@ -0,0 +1 @@ +1147 diff --git a/usr/lib/runit/sv/udevd/supervise/stat b/usr/lib/runit/sv/udevd/supervise/stat new file mode 100644 index 0000000..f5bdd21 --- /dev/null +++ b/usr/lib/runit/sv/udevd/supervise/stat @@ -0,0 +1 @@ +run diff --git a/usr/lib/runit/sv/udevd/supervise/status b/usr/lib/runit/sv/udevd/supervise/status new file mode 100644 index 0000000..aec1770 Binary files /dev/null and b/usr/lib/runit/sv/udevd/supervise/status differ diff --git a/usr/lib/runit/sv/udpxy/run b/usr/lib/runit/sv/udpxy/run new file mode 100755 index 0000000..3eacc27 --- /dev/null +++ b/usr/lib/runit/sv/udpxy/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec udpxy -T -S -p 4022 -B 256kb diff --git a/usr/lib/runit/sv/ufw/finish b/usr/lib/runit/sv/ufw/finish new file mode 100755 index 0000000..4c009e9 --- /dev/null +++ b/usr/lib/runit/sv/ufw/finish @@ -0,0 +1,3 @@ +#!/bin/sh +set -e +exec /usr/lib/ufw/ufw-init stop diff --git a/usr/lib/runit/sv/ufw/run b/usr/lib/runit/sv/ufw/run new file mode 100755 index 0000000..41b6523 --- /dev/null +++ b/usr/lib/runit/sv/ufw/run @@ -0,0 +1,4 @@ +#!/bin/sh +set -e +/usr/lib/ufw/ufw-init start quiet +exec chpst -b ufw pause diff --git a/usr/lib/runit/sv/unbound/run b/usr/lib/runit/sv/unbound/run new file mode 100755 index 0000000..378933e --- /dev/null +++ b/usr/lib/runit/sv/unbound/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec unbound -dp diff --git a/usr/lib/runit/sv/unrealircd/run b/usr/lib/runit/sv/unrealircd/run new file mode 100755 index 0000000..246f5e7 --- /dev/null +++ b/usr/lib/runit/sv/unrealircd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -u ircd unrealircd -F diff --git a/usr/lib/runit/sv/usbguard/run b/usr/lib/runit/sv/usbguard/run new file mode 100755 index 0000000..9c33365 --- /dev/null +++ b/usr/lib/runit/sv/usbguard/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec usbguard-daemon diff --git a/usr/lib/runit/sv/v2ray/run b/usr/lib/runit/sv/v2ray/run new file mode 100755 index 0000000..2998cf2 --- /dev/null +++ b/usr/lib/runit/sv/v2ray/run @@ -0,0 +1,4 @@ +#!/bin/sh +[ -r conf ] && . ./conf + +/usr/bin/v2ray -config /etc/v2ray/config.json > /var/log/v2ray.log diff --git a/usr/lib/runit/sv/virtlockd/run b/usr/lib/runit/sv/virtlockd/run new file mode 100755 index 0000000..ae1163c --- /dev/null +++ b/usr/lib/runit/sv/virtlockd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec virtlockd 2>&1 diff --git a/usr/lib/runit/sv/virtlogd/run b/usr/lib/runit/sv/virtlogd/run new file mode 100755 index 0000000..e27f13f --- /dev/null +++ b/usr/lib/runit/sv/virtlogd/run @@ -0,0 +1,3 @@ +#!/bin/sh +sv check dbus >/dev/null || exit 1 +exec virtlogd 2>&1 diff --git a/usr/lib/runit/sv/vnstatd/run b/usr/lib/runit/sv/vnstatd/run new file mode 100755 index 0000000..ea3a9ba --- /dev/null +++ b/usr/lib/runit/sv/vnstatd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec vnstatd -n diff --git a/usr/lib/runit/sv/vsftpd/run b/usr/lib/runit/sv/vsftpd/run new file mode 100755 index 0000000..0b237d7 --- /dev/null +++ b/usr/lib/runit/sv/vsftpd/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ -r conf ] && . ./conf +exec vsftpd -obackground=no ${OPTS} diff --git a/usr/lib/runit/sv/webfs/run b/usr/lib/runit/sv/webfs/run new file mode 100755 index 0000000..ef404e5 --- /dev/null +++ b/usr/lib/runit/sv/webfs/run @@ -0,0 +1,13 @@ +#!/bin/bash + +SRV_ROOT="${SRV_ROOT:-/srv/http}" +WEBFSD_OWNER="${WEBFSD_OWNER:-http:http}" +PORT="${PORT:-8080}" +SRV_FILE="${SRV_FILE:-index.html}" + +command="/usr/bin/webfsd" +command_user="$WEBFSD_OWNER" +command_args="-p ${PORT} -u ${WEBFSD_OWNER} -r ${SRV_ROOT} -f ${SRV_FILE} -F" + +exec chpst -u $WEBFSD_OWNER $command $command_args + diff --git a/usr/lib/runit/sv/webhook/run b/usr/lib/runit/sv/webhook/run new file mode 100755 index 0000000..4b8b001 --- /dev/null +++ b/usr/lib/runit/sv/webhook/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec webhook -hooks /etc/webhook/hooks.json -verbose 2>&1 diff --git a/usr/lib/runit/sv/wireguard/finish b/usr/lib/runit/sv/wireguard/finish new file mode 100755 index 0000000..7936e6c --- /dev/null +++ b/usr/lib/runit/sv/wireguard/finish @@ -0,0 +1,6 @@ +#!/bin/sh -e + +for conf in /etc/wireguard/*.conf; do + [ -e "$conf" ] || continue + wg-quick down "$conf" +done diff --git a/usr/lib/runit/sv/wireguard/run b/usr/lib/runit/sv/wireguard/run new file mode 100755 index 0000000..dfe04da --- /dev/null +++ b/usr/lib/runit/sv/wireguard/run @@ -0,0 +1,8 @@ +#!/bin/sh -e + +for conf in /etc/wireguard/*.conf; do + [ -e "$conf" ] || continue + wg-quick up "$conf" +done + +exec chpst -b wireguard pause diff --git a/usr/lib/runit/sv/wpa_supplicant/run b/usr/lib/runit/sv/wpa_supplicant/run new file mode 100755 index 0000000..2a9f965 --- /dev/null +++ b/usr/lib/runit/sv/wpa_supplicant/run @@ -0,0 +1,4 @@ +#!/bin/sh +[ -r ./conf ] && . ./conf +exec 2>&1 +exec wpa_supplicant -c ${CONF_FILE:=/etc/wpa_supplicant/wpa_supplicant.conf} -i ${WPA_INTERFACE:=wlan0} ${OPTS:=-s} diff --git a/usr/lib/runit/sv/xdm/run b/usr/lib/runit/sv/xdm/run new file mode 100755 index 0000000..49f1608 --- /dev/null +++ b/usr/lib/runit/sv/xdm/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec xdm -error /dev/stdout -nodaemon 2>&1 diff --git a/usr/lib/runit/sv/xinetd/run b/usr/lib/runit/sv/xinetd/run new file mode 100755 index 0000000..08bab88 --- /dev/null +++ b/usr/lib/runit/sv/xinetd/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec xinetd -dontfork -syslog daemon diff --git a/usr/lib/runit/sv/xl2tpd/run b/usr/lib/runit/sv/xl2tpd/run new file mode 100755 index 0000000..25b4756 --- /dev/null +++ b/usr/lib/runit/sv/xl2tpd/run @@ -0,0 +1,4 @@ +#!/bin/sh +[ -r conf ] && . ./conf +[ -d /run/xl2tpd ] || mkdir /run/xl2tpd +exec xl2tpd -D ${OPTS:=-c /etc/xl2tpd/xl2tpd.conf} diff --git a/usr/lib/runit/sv/znc/run b/usr/lib/runit/sv/znc/run new file mode 100755 index 0000000..7f69a9a --- /dev/null +++ b/usr/lib/runit/sv/znc/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec chpst -u znc:znc znc -f -n 2>&1