From 2cfd3fc44b16e7f3c6010c0ac1004efb6dacf382 Mon Sep 17 00:00:00 2001 From: Ivan Gabaldon Date: Sat, 5 Apr 2025 10:59:07 +0200 Subject: [enh] tidy: clean old morty, filtron, searx references Everyone should have already switched from legacy methods --- utils/filtron.sh | 125 --------------------- utils/lib.sh | 4 +- utils/morty.sh | 124 -------------------- utils/searx.sh | 88 --------------- utils/searxng.sh | 9 -- utils/templates/lib/systemd/system/filtron.service | 29 ----- utils/templates/lib/systemd/system/morty.service | 29 ----- 7 files changed, 2 insertions(+), 406 deletions(-) delete mode 100755 utils/filtron.sh delete mode 100755 utils/morty.sh delete mode 100755 utils/searx.sh delete mode 100644 utils/templates/lib/systemd/system/filtron.service delete mode 100644 utils/templates/lib/systemd/system/morty.service (limited to 'utils') diff --git a/utils/filtron.sh b/utils/filtron.sh deleted file mode 100755 index 2ac3b6dfd..000000000 --- a/utils/filtron.sh +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: AGPL-3.0-or-later -# shellcheck disable=SC2001 - -# shellcheck source=utils/lib.sh -source "$(dirname "${BASH_SOURCE[0]}")/lib.sh" - -# ---------------------------------------------------------------------------- -# config -# ---------------------------------------------------------------------------- - -PUBLIC_URL="${PUBLIC_URL:-${SEARXNG_URL}}" - -FILTRON_ETC="/etc/filtron" - -SERVICE_NAME="filtron" -SERVICE_USER="${SERVICE_USER:-${SERVICE_NAME}}" -SERVICE_SYSTEMD_UNIT="${SYSTEMD_UNITS}/${SERVICE_NAME}.service" - -APACHE_FILTRON_SITE="searx.conf" -NGINX_FILTRON_SITE="searx.conf" - -# ---------------------------------------------------------------------------- -usage() { -# ---------------------------------------------------------------------------- - - # shellcheck disable=SC1117 - cat <&1 | prefix_stdout - if service_is_available "${PUBLIC_URL}"; then - MSG="** Don't forget to remove your public site! (${PUBLIC_URL}) **" wait_key 10 - fi -} - -remove_apache_site() { - - rst_title "Remove Apache site $APACHE_FILTRON_SITE" - - rst_para "\ -This removes apache site ${APACHE_FILTRON_SITE}." - - ! apache_is_installed && err_msg "Apache is not installed." - - if ! ask_yn "Do you really want to continue?" Yn; then - return - fi - - apache_remove_site "$APACHE_FILTRON_SITE" - -} - -remove_nginx_site() { - - rst_title "Remove nginx site $NGINX_FILTRON_SITE" - - rst_para "\ -This removes nginx site ${NGINX_FILTRON_SITE}." - - ! nginx_is_installed && err_msg "nginx is not installed." - - if ! ask_yn "Do you really want to continue?" Yn; then - return - fi - - nginx_remove_app "$FILTRON_FILTRON_SITE" - -} - -# ---------------------------------------------------------------------------- -main "$@" -# ---------------------------------------------------------------------------- diff --git a/utils/lib.sh b/utils/lib.sh index ead4b0c61..d3d515c0a 100755 --- a/utils/lib.sh +++ b/utils/lib.sh @@ -1802,8 +1802,8 @@ url_replace_hostname(){ # to replace hostname by primary IP:: # - # url_replace_hostname http://searx-ubu1604/morty $(primary_ip) - # http://10.246.86.250/morty + # url_replace_hostname http://searx-ubu1604/example $(primary_ip) + # http://10.246.86.250/example # shellcheck disable=SC2001 echo "$1" | sed "s|\(http[s]*://\)[^/]*\(.*\)|\1$2\2|" diff --git a/utils/morty.sh b/utils/morty.sh deleted file mode 100755 index 52f0fec31..000000000 --- a/utils/morty.sh +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: AGPL-3.0-or-later - -# shellcheck source=utils/lib.sh -source "$(dirname "${BASH_SOURCE[0]}")/lib.sh" - -# ---------------------------------------------------------------------------- -# config -# ---------------------------------------------------------------------------- - -PUBLIC_URL="${PUBLIC_URL:-${SEARXNG_URL}}" - -MORTY_LISTEN="${MORTY_LISTEN:-127.0.0.1:3000}" -PUBLIC_URL_PATH_MORTY="${PUBLIC_URL_PATH_MORTY:-/morty/}" -PUBLIC_URL_MORTY="${PUBLIC_URL_MORTY:-$(echo "$PUBLIC_URL" | sed -e's,^\(.*://[^/]*\).*,\1,g')${PUBLIC_URL_PATH_MORTY}}" - -SERVICE_NAME="morty" -SERVICE_USER="${SERVICE_USER:-${SERVICE_NAME}}" -SERVICE_SYSTEMD_UNIT="${SYSTEMD_UNITS}/${SERVICE_NAME}.service" - -# Apache Settings - -APACHE_MORTY_SITE="morty.conf" -NGINX_MORTY_SITE="morty.conf" - -# ---------------------------------------------------------------------------- -usage() { -# ---------------------------------------------------------------------------- - - # shellcheck disable=SC1117 - cat <