2022-06-09 14:10:43 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
USER=@USER@
|
2022-07-12 12:30:59 +02:00
|
|
|
HOME="/home/$USER"
|
|
|
|
GROUPS=$(id -Gn "$USER" | tr ' ' ':')
|
2022-06-09 14:10:43 +02:00
|
|
|
SVDIR="$HOME/sv"
|
2022-07-12 12:30:59 +02:00
|
|
|
ID=$(id -u $USER)
|
2022-06-09 14:10:43 +02:00
|
|
|
|
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
|