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
+1 -7
View File
@@ -9,16 +9,10 @@ GROUPS_DIR="$DESOLATE_DIR/groups"
. "$HOME/.desolate/helpers.sh"
. "$PACKAGES_DIR/install.sh"
. "$SERVICES_DIR/install.sh"
. "$DOTFILES_DIR/install.sh"
. "$DESOLATE_DIR/assign-groups.sh"
. "$SERVICES_DIR/run.sh"
. "$SERVICES_DIR/install.sh"
gum style --foreground 15 "
Done!
"
if [ -f /tmp/reboot ]; then
sudo rm /tmp/reboot
sudo reboot
fi
-1
View File
@@ -12,7 +12,6 @@ if [ $(command -v zsh) >/dev/null 2>&1 ]; then
gum style --foreground 9 "✗ failed to change shell to zsh: $error"
else
gum style --foreground 15 "✓ changed shell to zsh"
sudo touch /tmp/reboot
fi
fi
fi
+2 -1
View File
@@ -8,7 +8,8 @@ INSTALLING SERVICES:
. "$SERVICES_DIR/install-chronyd.sh"
. "$SERVICES_DIR/install-dbus.sh"
. "$SERVICES_DIR/install-emptty.sh"
. "$SERVICES_DIR/install-seatd.sh"
. "$SERVICES_DIR/install-socklog-unix.sh"
. "$SERVICES_DIR/install-nanoklogd.sh"
. "$SERVICES_DIR/install-emptty.sh"