summaryrefslogtreecommitdiff
path: root/rc.turnserver/turnserver-log/run
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2025-06-20 14:36:47 +0200
committerEugen Wissner <belka@caraus.de>2025-06-20 14:36:47 +0200
commit6f22b57d1761e196e2d01c684977737c9f0afe5b (patch)
tree3abba0742dcd50125128ffa7710de3312b84b8c2 /rc.turnserver/turnserver-log/run
parent21efcfc5ef3466e4bbdb5758e9f21af14337e583 (diff)
downloads6-6f22b57d1761e196e2d01c684977737c9f0afe5b.tar.gz
Add the turnserver
Diffstat (limited to 'rc.turnserver/turnserver-log/run')
-rw-r--r--rc.turnserver/turnserver-log/run24
1 files changed, 24 insertions, 0 deletions
diff --git a/rc.turnserver/turnserver-log/run b/rc.turnserver/turnserver-log/run
new file mode 100644
index 0000000..fe64cb4
--- /dev/null
+++ b/rc.turnserver/turnserver-log/run
@@ -0,0 +1,24 @@
+#!/bin/execlineb -P
+
+#############################################
+# Start a logging daemon for the turnserver #
+#############################################
+
+s6-envdir env
+multisubstitute {
+ importas -u LOGDIR_OWNER LOGDIR_OWNER
+ importas -u LOGDIR_GROUP LOGDIR_GROUP
+ importas -u LOGDIR_PERMS LOGDIR_PERMS
+ importas -u CMD CMD
+ importas -usCd" " CMD_OPTS CMD_OPTS
+ importas -usCd" " LOG_SCRIPT LOG_SCRIPT
+}
+s6-envuidgid -B ${LOGDIR_OWNER}:${LOGDIR_GROUP}
+multisubstitute {
+ importas -u LOGDIR_PATH LOGDIR_PATH
+ importas -u UID UID
+ importas -u GID GID
+}
+if { install -dm $LOGDIR_PERMS -o $UID -g $GID $LOGDIR_PATH }
+s6-setuidgid ${UID}:${GID}
+exec -c $CMD $CMD_OPTS -- $LOG_SCRIPT