From ac02b92b12cd9e7bd044226343a1d3bffd7cb11b Mon Sep 17 00:00:00 2001 From: desolate <...> Date: Fri, 29 May 2026 12:11:35 +0300 Subject: [PATCH] streamline services installation process --- helpers.sh | 30 ------------------------------ install.sh | 8 +------- packages/install-zsh.sh | 1 - services/install.sh | 3 ++- 4 files changed, 3 insertions(+), 39 deletions(-) diff --git a/helpers.sh b/helpers.sh index 19b9bbc..5a1856f 100755 --- a/helpers.sh +++ b/helpers.sh @@ -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 diff --git a/install.sh b/install.sh index fe963af..62ec1ae 100755 --- a/install.sh +++ b/install.sh @@ -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 diff --git a/packages/install-zsh.sh b/packages/install-zsh.sh index 85ad22c..03c32c1 100755 --- a/packages/install-zsh.sh +++ b/packages/install-zsh.sh @@ -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 diff --git a/services/install.sh b/services/install.sh index 73da783..0853adb 100755 --- a/services/install.sh +++ b/services/install.sh @@ -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"