From 37007f1efee4cfc0fbfee407e82e94ec85fbbad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Slavi=C5=A1a=20Are=C5=BEina?= <58952836+tremor021@users.noreply.github.com> Date: Thu, 25 Dec 2025 15:21:20 +0100 Subject: [PATCH] Refactor (#10303) --- ct/ntfy.sh | 19 ++++++++----------- install/ntfy-install.sh | 20 +++++++------------- 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/ct/ntfy.sh b/ct/ntfy.sh index 99d9484bc..86f0f7bff 100644 --- a/ct/ntfy.sh +++ b/ct/ntfy.sh @@ -34,21 +34,18 @@ function update_script() { rm -f /etc/apt/sources.list.d/archive.heckel.io.list rm -f /etc/apt/sources.list.d/archive.heckel.io.list.bak rm -f /etc/apt/sources.list.d/archive.heckel.io.sources - curl -fsSL -o /etc/apt/keyrings/ntfy.gpg https://archive.ntfy.sh/apt/keyring.gpg - cat <<'EOF' >/etc/apt/sources.list.d/ntfy.sources -Types: deb -URIs: https://archive.ntfy.sh/apt/ -Suites: stable -Components: main -Signed-By: /etc/apt/keyrings/ntfy.gpg -EOF + setup_deb822_repo \ + "ntfy" \ + "https://archive.ntfy.sh/apt/keyring.gpg" \ + "https://archive.ntfy.sh/apt/" \ + "stable" msg_ok "Corrected old Ntfy Repository" fi - msg_info "Updating $APP LXC" + msg_info "Updating ntfy" $STD apt update - $STD apt -y upgrade - msg_ok "Updated $APP LXC" + $STD apt upgrade -y + msg_ok "Updated ntfy" msg_ok "Updated successfully!" exit } diff --git a/install/ntfy-install.sh b/install/ntfy-install.sh index 4debed9b4..85a034134 100644 --- a/install/ntfy-install.sh +++ b/install/ntfy-install.sh @@ -13,21 +13,15 @@ setting_up_container network_check update_os -msg_info "Installing ntfy" -mkdir -p /etc/apt/keyrings -curl -fsSL -o /etc/apt/keyrings/ntfy.gpg https://archive.ntfy.sh/apt/keyring.gpg -cat </etc/apt/sources.list.d/ntfy.sources -Types: deb -URIs: https://archive.ntfy.sh/apt/ -Suites: stable -Components: main -Signed-By: /etc/apt/keyrings/ntfy.gpg -EOF - -$STD apt update +msg_info "Setting up ntfy" +setup_deb822_repo \ + "ntfy" \ + "https://archive.ntfy.sh/apt/keyring.gpg" \ + "https://archive.ntfy.sh/apt/" \ + "stable" $STD apt install -y ntfy systemctl enable -q --now ntfy -msg_ok "Installed ntfy" +msg_ok "Setup ntfy" motd_ssh customize