14 lines
297 B
Bash
14 lines
297 B
Bash
#!/bin/sh
|
|
|
|
USER=@USER@
|
|
HOME="/home/$USER"
|
|
GROUPS=$(id -Gn "$USER" | tr ' ' ':')
|
|
SVDIR="$HOME/sv"
|
|
ID=$(id -u $USER)
|
|
|
|
[ ! -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
|