Create install.sh for root files (runsvdir-user)
This commit is contained in:
parent
1cb0647e44
commit
e1a5d59b06
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
user= # insert your username here
|
||||||
|
|
||||||
|
sed -i -e "s/\@USER\@/$user/g" sv/runsvdir/run
|
||||||
|
|
||||||
|
install -d /etc/sv/runsvdir-$user
|
||||||
|
install -m755 sv/runsvdir/run /etc/sv/runsvdir-$user/run
|
||||||
|
install -m755 sv/runsvdir/finish /etc/sv/runsvdir-$user/finish
|
||||||
|
ln -sf /run/runit/supervise.runsvdir-$user /etc/sv/runsvdir-$user/supervise
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
USER=@USER@
|
||||||
|
|
||||||
|
sv -w600 force-stop /home/$USER/sv/*
|
||||||
|
sv exit /home/$USER/sv/*
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
USER=@USER@
|
||||||
|
HOME="home/$USER"
|
||||||
|
GROUPS="$(id -Gn "$USER" | tr ' ' ':')"
|
||||||
|
SVDIR="$HOME/sv"
|
||||||
|
|
||||||
|
exec chpst -u "$USER:$GROUPS" sh -l -c "exec runsvdir $SVDIR $USER" $USER
|
Loading…
Reference in New Issue