dotfiles-old/.local/installers/artix/runit-config.sh

36 lines
979 B
Bash
Executable File

#!/bin/sh
help() {
echo "runit-config.sh [OPTIONS]"
echo " --wireless -> setup wireless services"
echo " -virt-manager -> setup virt-manager services"
echo ""
}
WIRELESS=""
VIRTMGR=""
for arg in "$@"
do
[ "$arg" = "--wireless" ] && WIRELESS="true"
[ "$arg" = "--virt-manager" ] && VIRTMGR="true"
[ "$arg" = "--help" ] && help && exit
done
sudo ln -s /etc/runit/sv/ufw /run/runit/service/
sudo ln -s /etc/runit/sv/cronie /run/runit/service/
sudo ln -s /etc/runit/sv/chrony /run/runit/service/
sudo ln -s /etc/runit/sv/connmand /run/runit/service/
sudo ln -s /etc/runit/sv/socklog /run/runit/service/
if [ "$WIRELESS" ]; then
sudo ln -s /etc/runit/sv/tlp /run/runit/service/
sudo ln -s /etc/runit/sv/bluetoothd /run/runit/service/
fi
if [ "$VIRTMGR" ]; then
sudo ln -s /etc/runit/sv/libvirtd /run/runit/service
sudo ln -s /etc/runit/sv/virtlockd /run/runit/service
sudo ln -s /etc/runit/sv/virtlogd /run/runit/service
fi