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