dotfiles/void-install/install-root.sh

15 lines
480 B
Bash
Executable File

#!/bin/sh
# install per-user-runsvdir in ~/sv
# drop available services in ~/.config/sv
# and link to ~/sv to enable them
user=
install -d /etc/sv/runsvdir-$user
install -m755 sv/runsvdir/run /etc/sv/runsvdir-$user/run
sed -i -e "s/\@USER\@/$user/g" /etc/sv/runsvdir-$user/run
install -m755 sv/runsvdir/finish /etc/sv/runsvdir-$user/finish
sed -i -e "s/\@USER\@/$user/g" /etc/sv/runsvdir-$user/finish
ln -sf /run/runit/supervise.runsvdir-$user /etc/sv/runsvdir-$user/supervise