diff options
Diffstat (limited to 'rc.redis/redis/template/log/run')
| -rwxr-xr-x | rc.redis/redis/template/log/run | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/rc.redis/redis/template/log/run b/rc.redis/redis/template/log/run new file mode 100755 index 0000000..f05f9eb --- /dev/null +++ b/rc.redis/redis/template/log/run @@ -0,0 +1,25 @@ +#!/bin/execlineb -WS1 + +############################################### +# Start a logging daemon for the redis daemon # +############################################### + +s6-envdir env +multisubstitute { + importas -iu LOGDIR_OWNER LOGDIR_OWNER + importas -iu LOGDIR_GROUP LOGDIR_GROUP + importas -iu LOGDIR_PERMS LOGDIR_PERMS + importas -iu CMD CMD + importas -usCd" " CMD_OPTS CMD_OPTS + importas -iusCd" " LOG_SCRIPT LOG_SCRIPT +} +s6-envuidgid -Bi ${LOGDIR_OWNER}:${LOGDIR_GROUP} +multisubstitute { + importas -iu LOGDIR_PATH LOGDIR_PATH + importas -iu UID UID + importas -iu GID GID +} +backtick -E port { dirname $1 } +if { install -dm $LOGDIR_PERMS -o $UID -g $GID $LOGDIR_PATH } +s6-setuidgid ${UID}:${GID} +exec -c $CMD $CMD_OPTS -- $LOG_SCRIPT |
