Skip to content

Instantly share code, notes, and snippets.

@j1cs
Last active March 12, 2021 01:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j1cs/b93157f9684c1d263e8c27011a9041f5 to your computer and use it in GitHub Desktop.
Save j1cs/b93157f9684c1d263e8c27011a9041f5 to your computer and use it in GitHub Desktop.
#!/bin/sh
mkdir -p /var/log/runsvdir-glats
exec svlogd -tt /var/log/runsvdir-glats
#!/bin/sh
exec 2>&1
for u in $(ls /home); do
groups="$(id -Gn "$u" | tr ' ' ':')"
svdir="/home/$u/.local/etc/runit/sv"
exec chpst -u "$u:$groups" runsvdir "$svdir"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment