dotfiles/void-install/sv/runsvdir/run

14 lines
297 B
Plaintext
Raw Normal View History

#!/bin/sh
USER=@USER@
2022-07-12 12:30:59 +02:00
HOME="/home/$USER"
GROUPS=$(id -Gn "$USER" | tr ' ' ':')
SVDIR="$HOME/sv"
2022-07-12 12:30:59 +02:00
ID=$(id -u $USER)
2022-07-12 12:30:59 +02:00
[ ! -d /run/user/$ID ] && \
mkdir -p /run/user/$USER && \
chown $USER:$USER /run/user/$USER
exec chpst -u "$USER:$GROUPS" sh -l -c "exec runsvdir $SVDIR $USER '...'" $USER