streamline services installation process

This commit is contained in:
desolate
2026-05-29 12:11:35 +03:00
parent 26c21e0eb5
commit ac02b92b12
4 changed files with 3 additions and 39 deletions
-30
View File
@@ -25,15 +25,7 @@ install_service()
local service="$1"
if [ -e "/var/service/$service" ]; then
sudo rm -rf "/var/service/$service"
fi
if sudo ln -s "/etc/sv/$service" "/var/service/"; then
if [ ! -f "/etc/sv/$service/down" ]; then
sudo touch "/etc/sv/$service/down"
fi
gum style --foreground 10 "$service"
else
gum style --foreground 9 "$service"
@@ -56,28 +48,6 @@ remove_service()
fi
}
run_service()
{
if [ "$#" -eq 0 ]; then
echo echo "✗ no service provided!"
return 1
fi
local service="$1"
if [ -f "/etc/sv/$service/down" ]; then
sudo rm "/etc/sv/$service/down"
fi
if sudo sv up "$service"; then
gum style --foreground 10 "$service"
else
gum style --foreground 9 "$service"
fi
}
install_dotfiles()
{
if [ $# -ne 3 ]; then