From 8004c8c001c72f775c94da40918608a5df17d469 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Tue, 22 Apr 2025 05:42:23 +0200 Subject: [PATCH] Fix. --- bookworm/scripts/lib/install_tags | 9 +++++++++ bookworm/scripts/setup_catgirl.sh | 13 ++++--------- bookworm/scripts/setup_seedbox.sh | 14 ++++++-------- testing/scripts/lib/set_hostname_and_hosts | 1 + 4 files changed, 20 insertions(+), 17 deletions(-) create mode 100644 bookworm/scripts/lib/install_tags create mode 120000 testing/scripts/lib/set_hostname_and_hosts diff --git a/bookworm/scripts/lib/install_tags b/bookworm/scripts/lib/install_tags new file mode 100644 index 0000000..8cd5c3e --- /dev/null +++ b/bookworm/scripts/lib/install_tags @@ -0,0 +1,9 @@ +. lib/copy_dirtrees_of_tags +. lib/ensure_packages_of_tags + +install_tags() { + _INSTALL_TAGS="$@" + echo "Installing packages and files for: ${_INSTALL_TAGS}" + ensure_packages_of_tags ${_INSTALL_TAGS} + copy_dirtrees_of_tags ${_INSTALL_TAGS} +} diff --git a/bookworm/scripts/setup_catgirl.sh b/bookworm/scripts/setup_catgirl.sh index 53be07c..5c0d0dc 100755 --- a/bookworm/scripts/setup_catgirl.sh +++ b/bookworm/scripts/setup_catgirl.sh @@ -3,21 +3,16 @@ set -e cd $(dirname "$0") . lib/check_finished_marker . lib/constants_user # PATH_USER_HOME -. lib/copy_dirtrees_of_tags -. lib/ensure_packages_of_tags . lib/expect_n_args +. lib/install_tags -check_finished_marker 'setup_server' expect_n_args 1 1 'IRC_PASSWORD' $@ IRC_PASSWORD="$1" -PATH_USER_CONF_CATGIRL="${PATH_USER_HOME}/.config/catgirl/libera" -INSTALL_TAGS=catgirl - -echo "\nInstalling packages, /etc and /home files." -ensure_packages_of_tags ${INSTALL_TAGS} -copy_dirtrees_of_tags ${INSTALL_TAGS} +check_finished_marker 'setup_server' +install_tags catgirl +PATH_USER_CONF_CATGIRL="${PATH_USER_HOME}/.config/catgirl/libera" echo "\nWriting provided password into ${PATH_USER_CONF_CATGIRL}." sed -i "s/REPLACE_WITH_IRC_PASSWORD/${IRC_PASSWORD}/g" "${PATH_USER_CONF_CATGIRL}" diff --git a/bookworm/scripts/setup_seedbox.sh b/bookworm/scripts/setup_seedbox.sh index 66c5289..513a72c 100755 --- a/bookworm/scripts/setup_seedbox.sh +++ b/bookworm/scripts/setup_seedbox.sh @@ -2,15 +2,13 @@ set -e cd $(dirname "$0") . lib/check_finished_marker -. lib/ensure_packages_of_tags -. lib/copy_dirtrees_of_tags +. lib/expect_n_args +. lib/install_tags -check_finished_marker 'setup_server' -INSTALL_TAGS=seedbox +expect_n_args 0 0 '' $@ -echo "\nInstalling packages, /etc and /home files." -ensure_packages_of_tags ${INSTALL_TAGS} -copy_dirtrees_of_tags ${INSTALL_TAGS} +check_finished_marker 'setup_server' +install_tags seedbox -echo "\nActivating service." +echo "\nActivating rtorrent tmux session service." systemctl enable --now rtorrent diff --git a/testing/scripts/lib/set_hostname_and_hosts b/testing/scripts/lib/set_hostname_and_hosts new file mode 120000 index 0000000..691795b --- /dev/null +++ b/testing/scripts/lib/set_hostname_and_hosts @@ -0,0 +1 @@ +../../../bookworm/scripts/lib/set_hostname_and_hosts \ No newline at end of file -- 2.30.2