From 92f72da15c1027e530f35e77aa2a968b441f1bda Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Mon, 5 May 2025 20:34:22 +0200 Subject: [PATCH] Refactor. --- .../aptmark/{server_basic => minimal_server} | 0 bookworm/scripts/lib/abort | 4 +- bookworm/scripts/lib/apt_get_edited | 4 +- bookworm/scripts/lib/check_finished_marker | 2 +- bookworm/scripts/lib/core_setup | 72 ++++++++++-------- bookworm/scripts/lib/ensure_packages_of_tags | 38 +++++----- bookworm/scripts/lib/expect_n_args | 4 +- bookworm/scripts/lib/install_tags | 7 +- bookworm/scripts/lib/minimize_installation | 76 ++++++++++--------- bookworm/scripts/lib/prefixed_msg | 13 ++++ bookworm/scripts/lib/put_finished_marker | 5 +- bookworm/scripts/setup_catgirl.sh | 12 ++- bookworm/scripts/setup_seedbox.sh | 13 +++- bookworm/scripts/setup_server.sh | 30 +++++--- testing/scripts/lib/minimize_installation | 2 +- trixie/aptmark/all_old | 1 - trixie/aptmark/server_basic_old | 1 - trixie/scripts/lib | 1 - 18 files changed, 167 insertions(+), 118 deletions(-) rename bookworm/aptmark/{server_basic => minimal_server} (100%) create mode 100644 bookworm/scripts/lib/prefixed_msg delete mode 120000 trixie/aptmark/all_old delete mode 120000 trixie/aptmark/server_basic_old delete mode 120000 trixie/scripts/lib diff --git a/bookworm/aptmark/server_basic b/bookworm/aptmark/minimal_server similarity index 100% rename from bookworm/aptmark/server_basic rename to bookworm/aptmark/minimal_server diff --git a/bookworm/scripts/lib/abort b/bookworm/scripts/lib/abort index b0a1704..d71c1e1 100644 --- a/bookworm/scripts/lib/abort +++ b/bookworm/scripts/lib/abort @@ -1,4 +1,6 @@ +. lib/prefixed_msg abort() { - echo "$1" + + prefixed_msg "$1" exit 1 } diff --git a/bookworm/scripts/lib/apt_get_edited b/bookworm/scripts/lib/apt_get_edited index 4289e65..960e4ff 100644 --- a/bookworm/scripts/lib/apt_get_edited +++ b/bookworm/scripts/lib/apt_get_edited @@ -1,6 +1,6 @@ . lib/abort_if_command_unknown - apt_get_edited() { + abort_if_command_unknown calc _SEDS=\ @@ -57,7 +57,7 @@ DEBIAN_FRONTEND=noninteractive apt-get -y $1 2>&1 | while read _LINE; do printf '\n\r%s' "${_LINE}" else if [ "${_PREFIX}" != "${_LAST_PREFIX}" ]; then - printf '\n\r# %s' "${_PREFIX}" + printf '\n\r# apt_get_edited: %s' "${_PREFIX}" _LAST_PREFIX="${_PREFIX}" fi printf ' %s' "${_COMPRESSED_ITEM}" diff --git a/bookworm/scripts/lib/check_finished_marker b/bookworm/scripts/lib/check_finished_marker index 38b806e..8766882 100644 --- a/bookworm/scripts/lib/check_finished_marker +++ b/bookworm/scripts/lib/check_finished_marker @@ -3,6 +3,6 @@ check_finished_marker() { _PATH_MARKER="${PATH_ROOT_FINISHEDS}/$1" if [ ! -f "${_PATH_MARKER}" ]; then - abort "# Missing dependency, did not find marker: ${_PATH_MARKER}" + abort "Missing dependency, did not find marker: ${_PATH_MARKER}" fi } diff --git a/bookworm/scripts/lib/core_setup b/bookworm/scripts/lib/core_setup index 5157cc4..9c3ace4 100644 --- a/bookworm/scripts/lib/core_setup +++ b/bookworm/scripts/lib/core_setup @@ -1,38 +1,44 @@ . lib/constants_user # USERNAME . lib/copy_dirtrees_of_tags . lib/minimize_installation - +. lib/prefixed_msg core_setup() { - _HOSTNAME="$1" - _FQDN="$2" - _EXTERNAL_IP="$3" - _INSTALL_TAGS="$4" - - minimize_installation ${_INSTALL_TAGS} - - echo '# And now: dist-upgrade …' - apt_get_edited '-q -q dist-upgrade' - - echo "# Setting up user: ${USERNAME}" - adduser --quiet --disabled-password --gecos "" "${USERNAME}" - usermod -a -G sudo "${USERNAME}" - - echo '# Copying over files, directories …' - copy_dirtrees_of_tags ${_INSTALL_TAGS} - - echo '# Setting hostname …' - hostnamectl hostname "${_HOSTNAME}" - - echo "# Adapting ${_PATH_HOSTS} …" - _PATH_HOSTS="${PATH_ETC}/hosts" - if [ -z "${_FQDN}" ]; then - sed -i 's/REPLACE_WITH_FQDN/REPLACE_WITH_HOSTNAME.local REPLACE_WITH_HOSTNAME.localdomain/g' "${_PATH_HOSTS}" - else - sed -i 's/REPLACE_WITH_FQDN/'"${_FQDN}"'/g' "${_PATH_HOSTS}" - sed -i "s/#REPLACE_WITH_EXTERNAL_IP/${_EXTERNAL_IP}/g" "${_PATH_HOSTS}" - fi - sed -i 's/REPLACE_WITH_HOSTNAME/'"${_HOSTNAME}"'/g' "${_PATH_HOSTS}" - - echo '# Syncing clock …' - ntpdate-debian -s +prefixed_msg_init '### core_setup: ' +prefixed_msg 'starting (performing standard installation setup steps)' + +_HOSTNAME="$1" +_FQDN="$2" +_EXTERNAL_IP="$3" +_INSTALL_TAGS="$4" + +minimize_installation ${_INSTALL_TAGS} + +prefixed_msg 'And now: dist-upgrade …' +apt_get_edited '-q -q dist-upgrade' + +prefixed_msg "Setting up user: ${USERNAME}" +adduser --quiet --disabled-password --gecos "" "${USERNAME}" +usermod -a -G sudo "${USERNAME}" + +prefixed_msg 'Copying over files, directories …' +copy_dirtrees_of_tags ${_INSTALL_TAGS} + +prefixed_msg 'Setting hostname …' +hostnamectl hostname "${_HOSTNAME}" + +prefixed_msg "Adapting ${_PATH_HOSTS} …" +_PATH_HOSTS="${PATH_ETC}/hosts" +if [ -z "${_FQDN}" ]; then + sed -i 's/REPLACE_WITH_FQDN/REPLACE_WITH_HOSTNAME.local REPLACE_WITH_HOSTNAME.localdomain/g' "${_PATH_HOSTS}" +else + sed -i 's/REPLACE_WITH_FQDN/'"${_FQDN}"'/g' "${_PATH_HOSTS}" + sed -i "s/#REPLACE_WITH_EXTERNAL_IP/${_EXTERNAL_IP}/g" "${_PATH_HOSTS}" +fi +sed -i 's/REPLACE_WITH_HOSTNAME/'"${_HOSTNAME}"'/g' "${_PATH_HOSTS}" + +prefixed_msg 'Syncing clock …' +ntpdate-debian -s + +prefixed_msg 'finished' +prefixed_msg_exit } diff --git a/bookworm/scripts/lib/ensure_packages_of_tags b/bookworm/scripts/lib/ensure_packages_of_tags index f8ca1d0..9344a5d 100644 --- a/bookworm/scripts/lib/ensure_packages_of_tags +++ b/bookworm/scripts/lib/ensure_packages_of_tags @@ -1,21 +1,23 @@ . lib/apt_get_edited - +. lib/prefixed_msg ensure_packages_of_tags() { - # Walk through the package names in ../aptmark/ files to ensure the respective - # packages are installed. - for _TAG in $@; do - _PATH_APTMARK_TAG="../aptmark/${_TAG}" - if [ ! -f "${_PATH_APTMARK_TAG}" ]; then - continue - fi - _PACKAGES=$(cat "${_PATH_APTMARK_TAG}" | sed -E 's/#.*//g' | sed -z 's/\n/ /g' | sed 's/ */ /g' | cut -c 2-) - echo -n "# For tag '${_TAG}', " - if [ -z "${_PACKAGES}" ]; then - echo "nothing to install." - else - echo "ensuring installation of: ${_PACKAGES}" - apt_get_edited "-q -q -o Dpkg::Options::=--force-confnew install ${_PACKAGES}" - fi - done - echo '' +prefixed_msg_init '# ensure_packages_of_tags' +prefixed_msg 'starting (walking through package names in ../aptmark/ files to ensure respective packages are installed' + +for _TAG in $@; do + _PATH_APTMARK_TAG="../aptmark/${_TAG}" + if [ ! -f "${_PATH_APTMARK_TAG}" ]; then + continue + fi + _PACKAGES=$(cat "${_PATH_APTMARK_TAG}" | sed -E 's/#.*//g' | sed -z 's/\n/ /g' | sed 's/ */ /g' | cut -c 2-) + prefixed_msg_no_nl "For tag '${_TAG}', " + if [ -z "${_PACKAGES}" ]; then + echo "nothing to install." + else + echo "ensuring installation of: ${_PACKAGES}" + apt_get_edited "-q -q -o Dpkg::Options::=--force-confnew install ${_PACKAGES}" + fi +done +prefixed_msg '\nfinished' +prefixed_msg_exit } diff --git a/bookworm/scripts/lib/expect_n_args b/bookworm/scripts/lib/expect_n_args index 54f98b8..7db333a 100644 --- a/bookworm/scripts/lib/expect_n_args +++ b/bookworm/scripts/lib/expect_n_args @@ -10,11 +10,11 @@ expect_n_args() { _ABORT_MSG="missing arguments (got $# instead of ${_N_MIN_ARGS})." elif [ "$#" -gt "${_N_MAX_ARGS}" ]; then shift "${_N_MAX_ARGS}" - _ABORT_MSG="unexpected arguments beyond expected number (${_N_MAX_ARGS}): $@" + _ABORT_MSG="unexpected arguments beyond expected number (${_N_MAX_ARGS}): $@." fi if [ ! -z "${_ABORT_MSG}" ]; then if [ ! -z "${_USAGE}" ]; then - _ABORT_MSG="${_ABORT_MSG}\nExpected arguments: ${_USAGE}" + _ABORT_MSG="${_ABORT_MSG} Expected arguments: ${_USAGE}" fi abort "Aborting due to ${_ABORT_MSG}" fi diff --git a/bookworm/scripts/lib/install_tags b/bookworm/scripts/lib/install_tags index d3e87c4..e69ec79 100644 --- a/bookworm/scripts/lib/install_tags +++ b/bookworm/scripts/lib/install_tags @@ -1,9 +1,12 @@ . lib/copy_dirtrees_of_tags . lib/ensure_packages_of_tags - +. lib/prefixed_msg install_tags() { + prefixed_msg_init '# install_tags: ' + _INSTALL_TAGS="$@" - echo "# Installing packages and files for: ${_INSTALL_TAGS}" + prefixed_msg "Installing packages and files for: ${_INSTALL_TAGS}" ensure_packages_of_tags ${_INSTALL_TAGS} copy_dirtrees_of_tags ${_INSTALL_TAGS} + prefixed_msg_exit } diff --git a/bookworm/scripts/lib/minimize_installation b/bookworm/scripts/lib/minimize_installation index ec7ec54..7c993d2 100644 --- a/bookworm/scripts/lib/minimize_installation +++ b/bookworm/scripts/lib/minimize_installation @@ -1,40 +1,44 @@ . lib/apt_get_edited . lib/ensure_packages_of_tags - +. lib/prefixed_msg minimize_installation() { - _INSTALL_TAGS="$@" - - echo '### minimize_installation: narrow system to what is required explicitly by us and Debian' - _TOK_REQ=' required' - _PATH_LIST_PREFIX=/tmp/list_ - _PATH_LIST_UNSORTED="${_PATH_LIST_PREFIX}unsorted" - _PATH_LIST_WHITE="${_PATH_LIST_PREFIX}white" - _PATH_LIST_ALL_PACKAGES="${_PATH_LIST_PREFIX}all_packages" - _PATH_LIST_BLACK="${_PATH_LIST_PREFIX}black" - - if ! which calc > /dev/null; then - echo '# not found calc, which is needed, so installing …' - apt-get -y -q -q install calc > /dev/null - fi - - echo "# Collect packages deemed '${_TOK_REQ}' by Debian: " - dpkg-query -Wf '${Package} ${Priority}\n' | grep "${_TOK_REQ}" | cut -d' ' -f1 > "${_PATH_LIST_UNSORTED}" - sort "${_PATH_LIST_UNSORTED}" > "${_PATH_LIST_WHITE}" - echo $(cat "${_PATH_LIST_WHITE}") - - echo -n '# Collect installed packages outside this selection: ' - dpkg-query -Wf '${Package}\n' > "${_PATH_LIST_UNSORTED}" - sort "${_PATH_LIST_UNSORTED}" > "${_PATH_LIST_ALL_PACKAGES}" - comm -3 "${_PATH_LIST_ALL_PACKAGES}" "${_PATH_LIST_WHITE}" > "${_PATH_LIST_BLACK}" - echo $(cat "${_PATH_LIST_BLACK}") - - echo '# apt-mark auto packages from diff …' - apt-mark auto `cat "${_PATH_LIST_BLACK}"` > /dev/null - rm "${_PATH_LIST_UNSORTED}" "${_PATH_LIST_ALL_PACKAGES}" "${_PATH_LIST_WHITE}" "${_PATH_LIST_BLACK}" - - echo '# install or mark as manually installed packages from our own selections …' - ensure_packages_of_tags ${_INSTALL_TAGS} - - echo '# run autopurge to get rid of all unwanted packages …' - apt_get_edited '-q -q autopurge' +prefixed_msg_init '### minimize_installation: ' +_INSTALL_TAGS="$@" +prefixed_msg "starting (narrow system to what is required explicitly by Debian and by us, as per these INSTALL_TAGS: ${_INSTALL_TAGS})" + +_TOK_REQ='required' +_PATH_LIST_PREFIX=/tmp/list_ +_PATH_LIST_UNSORTED="${_PATH_LIST_PREFIX}unsorted" +_PATH_LIST_WHITE="${_PATH_LIST_PREFIX}white" +_PATH_LIST_ALL_PACKAGES="${_PATH_LIST_PREFIX}all_packages" +_PATH_LIST_BLACK="${_PATH_LIST_PREFIX}black" + +if ! which calc > /dev/null; then + prefixed_msg 'not found calc, which is needed, so installing …' + apt-get -y -q -q install calc > /dev/null +fi + +prefixed_msg_no_nl "collect packages deemed '${_TOK_REQ}' by Debian: " +dpkg-query -Wf '${Package} ${Priority}\n' | grep " ${_TOK_REQ}" | cut -d' ' -f1 > "${_PATH_LIST_UNSORTED}" +sort "${_PATH_LIST_UNSORTED}" > "${_PATH_LIST_WHITE}" +echo $(cat "${_PATH_LIST_WHITE}") + +prefixed_msg_no_nl 'collect installed packages outside this selection: ' +dpkg-query -Wf '${Package}\n' > "${_PATH_LIST_UNSORTED}" +sort "${_PATH_LIST_UNSORTED}" > "${_PATH_LIST_ALL_PACKAGES}" +comm -3 "${_PATH_LIST_ALL_PACKAGES}" "${_PATH_LIST_WHITE}" > "${_PATH_LIST_BLACK}" +echo $(cat "${_PATH_LIST_BLACK}") + +prefixed_msg 'apt-mark auto from diff …' +apt-mark auto `cat "${_PATH_LIST_BLACK}"` > /dev/null +rm "${_PATH_LIST_UNSORTED}" "${_PATH_LIST_ALL_PACKAGES}" "${_PATH_LIST_WHITE}" "${_PATH_LIST_BLACK}" + +prefixed_msg 'install or mark as manually installed packages from our own selections …' +ensure_packages_of_tags ${_INSTALL_TAGS} + +prefixed_msg 'run autopurge to get rid of all unwanted packages …' +apt_get_edited '-q -q autopurge' + +prefixed_msg 'finished' +prefixed_msg_exit } diff --git a/bookworm/scripts/lib/prefixed_msg b/bookworm/scripts/lib/prefixed_msg new file mode 100644 index 0000000..393a061 --- /dev/null +++ b/bookworm/scripts/lib/prefixed_msg @@ -0,0 +1,13 @@ +prefixed_msg_init() { + prefixed_msg_OLD_PREFIX=prefixed_msg_PREFIX + prefixed_msg_PREFIX="$1" +} +prefixed_msg_exit() { + prefixed_msg_PREFIX=prefixed_msg_OLD_PREFIX +} +prefixed_msg() { + printf '%s%s\n' "${prefixed_msg_PREFIX}" "$1" +} +prefixed_msg_no_nl() { + printf '%s%s' "${prefixed_msg_PREFIX}" "$1" +} diff --git a/bookworm/scripts/lib/put_finished_marker b/bookworm/scripts/lib/put_finished_marker index 351ef1a..baacfa4 100644 --- a/bookworm/scripts/lib/put_finished_marker +++ b/bookworm/scripts/lib/put_finished_marker @@ -1,7 +1,8 @@ . lib/constants_finished - +. lib/prefixed_msg put_finished_marker() { - echo "Marking as finished: $1" + + prefixed_msg "Marking as finished: $1" mkdir -p "${PATH_ROOT_FINISHEDS}" touch "${PATH_ROOT_FINISHEDS}/$1" } diff --git a/bookworm/scripts/setup_catgirl.sh b/bookworm/scripts/setup_catgirl.sh index b12c9a9..2736fcd 100755 --- a/bookworm/scripts/setup_catgirl.sh +++ b/bookworm/scripts/setup_catgirl.sh @@ -5,6 +5,10 @@ cd $(dirname "$0") . lib/constants_user # PATH_USER_HOME . lib/expect_n_args . lib/install_tags +. lib/prefixed_msg + +prefixed_msg_init '##### setup_catgirl.sh: ' +prefixed_msg 'starting' expect_n_args 1 1 'IRC_PASSWORD' $@ IRC_PASSWORD="$1" @@ -13,12 +17,14 @@ check_finished_marker 'setup_server' install_tags catgirl PATH_USER_CONF_CATGIRL="${PATH_USER_HOME}/.config/catgirl/libera" -echo "\n# Writing provided password into ${PATH_USER_CONF_CATGIRL} …" +prefixed_msg "Writing provided password into ${PATH_USER_CONF_CATGIRL} …" sed -i "s/REPLACE_WITH_IRC_PASSWORD/${IRC_PASSWORD}/g" "${PATH_USER_CONF_CATGIRL}" -echo "# Activating catgirl tmux session service …" +prefixed_msg 'Activating catgirl tmux session service …' systemctl enable --now catgirl -echo "# Activating catgirl logs encryption service/timer …" +prefixed_msg 'Activating catgirl logs encryption service/timer …' systemctl enable --now encrypt_catgirl_logs.timer +prefixed_msg 'finished' +prefixed_msg_exit diff --git a/bookworm/scripts/setup_seedbox.sh b/bookworm/scripts/setup_seedbox.sh index 36dce2c..35abb87 100755 --- a/bookworm/scripts/setup_seedbox.sh +++ b/bookworm/scripts/setup_seedbox.sh @@ -4,14 +4,21 @@ cd $(dirname "$0") . lib/check_finished_marker . lib/expect_n_args . lib/install_tags +. lib/prefixed_msg + +prefixed_msg_init '##### setup_seedbox.sh: ' +prefixed_msg 'starting' expect_n_args 0 0 '' $@ check_finished_marker 'setup_server' install_tags seedbox -echo '# Setting up upload user/directory …' +prefixed_msg 'Setting up upload user/directory …' adduser --quiet --system --home /home/upload upload -echo '# Activating rtorrent tmux session service …' -#systemctl enable --now rtorrent +prefixed_msg 'Activating rtorrent tmux session service …' +systemctl enable --now rtorrent + +prefixed_msg 'finished' +prefixed_msg_exit diff --git a/bookworm/scripts/setup_server.sh b/bookworm/scripts/setup_server.sh index ad62e34..7c707b3 100755 --- a/bookworm/scripts/setup_server.sh +++ b/bookworm/scripts/setup_server.sh @@ -1,16 +1,22 @@ #!/bin/sh set -e cd $(dirname "$0") +. lib/abort_if_command_unknown . lib/constants_etc # PATH_ETC . lib/constants_ssh # PATH_REL_SSH, PATH_USER_SSH . lib/copy_dirtrees_of_tags . lib/core_setup . lib/expect_n_args . lib/path_tmp_timestamped +. lib/prefixed_msg . lib/put_finished_marker +prefixed_msg_init '##### setup_server.sh: ' +prefixed_msg 'starting (setting up basics of standard server)' + INSTALL_TAGS='all server user' +abort_if_command_unknown gpg expect_n_args 2 3 'CADDY_PASSWORD, HOSTNAME, [FQDN]' $@ CADDY_PASSWORD="$1" HOSTNAME="$2" @@ -21,7 +27,7 @@ PATH_CADDYFILE="${PATH_ETC}/caddy/Caddyfile" PATH_CADDY_REPO='https://dl.cloudsmith.io/public/caddy/stable' PATH_DUMP='/var/www/dump' -echo -n '# Determining external IP …' +prefixed_msg_no_nl 'Determining external IP …' for _CANDIDATE in $(hostname -I); do _START=$(echo ${_CANDIDATE} | cut -d'.' -f1) if [ "$(echo -n ${_START} | wc -c)" -gt 3 ]; then # ignore IPv6 @@ -36,17 +42,17 @@ done echo " it's: ${EXTERNAL_IP}" if [ ! -z "${FQDN}" ]; then - echo "# Ensuring provided FQDN ${FQDN} maps to it …" + prefixed_msg "Ensuring provided FQDN ${FQDN} maps to it …" IP_BY_DNS=$(getent ahostsv4 "${FQDN}" | head -1 | cut -d' ' -f1) if [ ! "${IP_BY_DNS}" = "${EXTERNAL_IP}" ]; then abort "DNS mapping provided FQDN '${FQDN}' to ${IP_BY_DNS} rather than this system's external IP ${EXTERNAL_IP}." fi fi -echo '# Ensure we have curl (for caddy installation preparation) …' +prefixed_msg 'Ensure we have curl (for caddy installation preparation) …' apt-get -y install curl > /dev/null PATH_CURL_ERROR="$(path_tmp_timestamped curl_error)" -echo '# Retrieve caddy repo key …' +prefixed_msg 'Retrieve caddy repo key …' set +e curl -1Lf "${PATH_CADDY_REPO}/gpg.key" 2> "${PATH_CURL_ERROR}" | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg RESULT="$?" @@ -56,28 +62,28 @@ if [ "${RESULT}" != '0' ]; then exit 1 fi PATH_APT_CADDY_REPO='/etc/apt/sources.list.d/caddy-stable.list' -echo "# Adding caddy repo to ${PATH_APT_CADDY_REPO} …" +prefixed_msg "Adding caddy repo to ${PATH_APT_CADDY_REPO} …" curl -1LfsS "${PATH_CADDY_REPO}/debian.deb.txt" > "${PATH_APT_CADDY_REPO}" core_setup "${HOSTNAME}" "${FQDN}" "${EXTERNAL_IP}" "${INSTALL_TAGS}" -echo '# Moving SSH data from root to user …' +prefixed_msg 'Moving SSH data from root to user …' mkdir -p "${PATH_USER_SSH}" mv "/root/${PATH_REL_SSH}/authorized_keys" "${PATH_USER_SSH}/" chown -R "${USERNAME}:${USERNAME}" "${PATH_USER_SSH}" -echo '# Setting up minimal borg user …' +prefixed_msg 'Setting up minimal borg user …' adduser --quiet --system --home "${PATH_BORG_HOME}" --shell /bin/sh borg cp -a "${PATH_USER_SSH}" "${PATH_BORG_HOME}/" chown -R borg:nogroup "${PATH_BORG_HOME}/${PATH_REL_SSH}" -echo '# Enabling firewall …' +prefixed_msg 'Enabling firewall …' systemctl --quiet enable --now nftables -echo "# Creating web-accessible directories …" +prefixed_msg "Creating web-accessible directories …" mkdir -p "${PATH_DUMP}/private" "${PATH_DUMP}/public" -echo "# Adapting ${PATH_CADDYFILE} …" +prefixed_msg "Adapting ${PATH_CADDYFILE} …" CADDY_PW_HASH=$(caddy hash-password --plaintext "${CADDY_PASSWORD}") if [ -z "${FQDN}" ]; then ADDRESS_TO_CADDY="${EXTERNAL_IP}" @@ -87,7 +93,9 @@ fi sed -i 's|REPLACE_WITH_HASH|'"${CADDY_PW_HASH}"'|g' "${PATH_CADDYFILE}" sed -i 's/REPLACE_WITH_FQDN/'"${ADDRESS_TO_CADDY}"'/g' "${PATH_CADDYFILE}" -echo "# Restarting caddy …" +prefixed_msg "Restarting caddy …" systemctl reload caddy put_finished_marker 'setup_server' +prefixed_msg 'finished' +prefixed_msg_exit diff --git a/testing/scripts/lib/minimize_installation b/testing/scripts/lib/minimize_installation index b12c91d..e2b2ccb 120000 --- a/testing/scripts/lib/minimize_installation +++ b/testing/scripts/lib/minimize_installation @@ -1 +1 @@ -../../../bookworm/scripts/lib/minimize_installation \ No newline at end of file +../../../trixie/scripts/lib/minimize_installation \ No newline at end of file diff --git a/trixie/aptmark/all_old b/trixie/aptmark/all_old deleted file mode 120000 index 1913f5e..0000000 --- a/trixie/aptmark/all_old +++ /dev/null @@ -1 +0,0 @@ -../../bookworm/aptmark/all \ No newline at end of file diff --git a/trixie/aptmark/server_basic_old b/trixie/aptmark/server_basic_old deleted file mode 120000 index 13ab3c2..0000000 --- a/trixie/aptmark/server_basic_old +++ /dev/null @@ -1 +0,0 @@ -../../bookworm/aptmark/server_basic \ No newline at end of file diff --git a/trixie/scripts/lib b/trixie/scripts/lib deleted file mode 120000 index 0b50b36..0000000 --- a/trixie/scripts/lib +++ /dev/null @@ -1 +0,0 @@ -../../bookworm/scripts/lib \ No newline at end of file -- 2.30.2