aboutsummaryrefslogtreecommitdiffstats
path: root/image/fcgiwrap-launcher
diff options
context:
space:
mode:
Diffstat (limited to 'image/fcgiwrap-launcher')
-rwxr-xr-ximage/fcgiwrap-launcher15
1 files changed, 15 insertions, 0 deletions
diff --git a/image/fcgiwrap-launcher b/image/fcgiwrap-launcher
new file mode 100755
index 0000000..0970ec4
--- /dev/null
+++ b/image/fcgiwrap-launcher
@@ -0,0 +1,15 @@
+#!/bin/zsh
+set -eax
+command="/usr/bin/fcgiwrap"
+user="fcgiwrap"
+group="www-data"
+: ${socket:="unix:/run/fcgiwrap/fcgiwrap.sock"}
+case "$socket" in
+unix:/*)
+ local socket_path="${socket#unix:}"
+ /usr/libexec/rc/bin/checkpath --directory --mode 2775 --owner "${user}:${group}" \
+ "${socket_path%/*}"
+ ;;
+esac
+
+exec sudo -u "$user" -g "$group" "$command" -c "${nproc:-$(nproc)}" -s "$socket"