-
-
Save znz/1350272 to your computer and use it in GitHub Desktop.
/etc/sv/nadoka-ircnet/run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
exec 2>&1 | |
logger -s -t runsv -- start "$(basename $(pwd))" | |
USER=nadoka | |
TARGET_UID=$(id -u $USER) | |
TARGET_GID=$(id -g $USER) | |
if [ -z "$TARGET_UID" -o -z "$TARGET_GID" ]; then | |
logger -s -t runsv -- "id failed: UID=$TARGET_UID GID=$TARGET_GID" | |
exec sleep 10 | |
fi | |
cd "/home/$USER" | |
exec chpst -u ":$TARGET_UID:$TARGET_GID" /home/nadoka/d/nadoka/run-ircnet.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment