diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-07-09 19:34:55 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-07-09 19:34:55 +0200 |
| commit | 6e6752c7076cc32a66f1223293ae44108562f664 (patch) | |
| tree | 66939a4b6ca63fc61d860b93410cbfcd41c56e20 /rc.spawn-fcgi/fcgiwrap-srv/run | |
| parent | 125fa7f6c6e163de52c97f3c482dcd72849c6744 (diff) | |
| download | s6-6e6752c7076cc32a66f1223293ae44108562f664.tar.gz | |
Add spawn-fcgi
Diffstat (limited to 'rc.spawn-fcgi/fcgiwrap-srv/run')
| -rw-r--r-- | rc.spawn-fcgi/fcgiwrap-srv/run | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/rc.spawn-fcgi/fcgiwrap-srv/run b/rc.spawn-fcgi/fcgiwrap-srv/run new file mode 100644 index 0000000..90a232b --- /dev/null +++ b/rc.spawn-fcgi/fcgiwrap-srv/run @@ -0,0 +1,24 @@ +#!/bin/execlineb -P + +#################################################### +# Start fcgiwrap (FastCGI wrapper for CGI scripts) # +#################################################### + +s6-envdir env +multisubstitute { + importas -u SOCKET_OWNER SOCKET_OWNER + importas -u SOCKET_GROUP SOCKET_GROUP + importas -u SOCKET_PERMS SOCKET_PERMS + importas -u SOCKET_PATH SOCKET_PATH + importas -u CMD CMD +} +s6-envuidgid -B ${SOCKET_OWNER}:${SOCKET_GROUP} +multisubstitute { + importas -u UID UID + importas -u GID GID +} +foreground { install -dm $SOCKET_PERMS -o $UID -g $GID /run/fcgiwrap } +s6-ipcserver-socketbinder -B -d -a $SOCKET_PERMS $SOCKET_PATH +foreground { chown ${SOCKET_OWNER}:${SOCKET_GROUP} $SOCKET_PATH } +s6-setuidgid ${UID}:${GID} +exec -c $CMD |
