fixes to void-install runsvdir templates
This commit is contained in:
parent
20cc076a54
commit
7dc0c5cb23
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
user=@USER@
|
||||
ZUSER=@USER@
|
||||
|
||||
sv -w600 force-stop /home/$user/sv/*
|
||||
sv exit /home/$user/sv/*
|
||||
sv -w600 force-stop /home/$ZUSER/sv/*
|
||||
sv exit /home/$ZUSER/sv/*
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
USER=@USER@
|
||||
HOME="/home/$USER"
|
||||
GROUPS=$(id -Gn "$USER" | tr ' ' ':')
|
||||
ZUSER=@USER@
|
||||
export HOME="/home/$ZUSER"
|
||||
GROUPS=$(id -Gn "$ZUSER" | tr ' ' ':')
|
||||
SVDIR="$HOME/sv"
|
||||
ID=$(id -u $USER)
|
||||
ID=$(id -u $ZUSER)
|
||||
|
||||
[ ! -d /run/user/$ID ] && \
|
||||
mkdir -p /run/user/$USER && \
|
||||
chown $USER:$USER /run/user/$USER
|
||||
mkdir -p /run/user/$ZUSER && \
|
||||
chown $ZUSER:$ZUSER /run/user/$ZUSER
|
||||
|
||||
exec chpst -u "$USER:$GROUPS" sh -l -c "exec runsvdir $SVDIR $USER '...'" $USER
|
||||
exec chpst -u "$ZUSER:$GROUPS" sh -l -c "exec runsvdir $SVDIR $ZUSER '...'" $ZUSER
|
||||
|
|
Loading…
Reference in New Issue