From 8022e1984d788474e9371cb77db160e34051a473 Mon Sep 17 00:00:00 2001 From: Cobalt <65132371+cobaltgit@users.noreply.github.com> Date: Thu, 18 Sep 2025 10:57:40 +0100 Subject: [PATCH 01/13] alpine-caddy: change name and slug in frontend json --- frontend/public/json/caddy.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/public/json/caddy.json b/frontend/public/json/caddy.json index 0f59a88d..607a9f7e 100644 --- a/frontend/public/json/caddy.json +++ b/frontend/public/json/caddy.json @@ -1,6 +1,6 @@ { - "name": "Alpine-Caddy", - "slug": "alpine-caddy", + "name": "Caddy", + "slug": "caddy", "categories": [ 21 ], From 5905a392180ca9f18648d3f62d5eb8832d842575 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Thu, 18 Sep 2025 17:40:53 +0100 Subject: [PATCH 02/13] ct: add alpine-ntfy todo: add json, change port to 80 --- ct/alpine-ntfy.sh | 43 ++++++++++++++++++++++++++++++++++ ct/ntfy.sh | 1 + install/alpine-ntfy-install.sh | 24 +++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 ct/alpine-ntfy.sh create mode 100644 ct/ntfy.sh create mode 100644 install/alpine-ntfy-install.sh diff --git a/ct/alpine-ntfy.sh b/ct/alpine-ntfy.sh new file mode 100644 index 00000000..2fdba679 --- /dev/null +++ b/ct/alpine-ntfy.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: cobalt (cobaltgit) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://ntfy.sh/ + +APP="ntfy" +var_tags="${var_tags:-notification}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-256}" +var_disk="${var_disk:-2}" +var_os="${var_os:-alpine}" +var_version="${var_version:-3.22}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +init_error_traps + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -d /var ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating $APP LXC" + $STD apk -U upgrade + msg_ok "Updated $APP LXC" + exit +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following URL:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}" diff --git a/ct/ntfy.sh b/ct/ntfy.sh new file mode 100644 index 00000000..c2c61a72 --- /dev/null +++ b/ct/ntfy.sh @@ -0,0 +1 @@ +# placeholder for CI/CD to run diff --git a/install/alpine-ntfy-install.sh b/install/alpine-ntfy-install.sh new file mode 100644 index 00000000..85e123e7 --- /dev/null +++ b/install/alpine-ntfy-install.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: cobalt (cobaltgit) +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://ntfy.sh/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +init_error_traps +setting_up_container +network_check +update_os + +msg_info "Installing ntfy" +$STD apk add --no-cache ntfy ntfy-openrc +$STD rc-update add ntfy default +$STD service ntfy start +msg_ok "Installed ntfy" + +motd_ssh +customize + From 69e69330ddabab8b0508fa1c4f56b9b7366269f1 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Thu, 18 Sep 2025 17:42:22 +0100 Subject: [PATCH 03/13] alpine-ntfy: add json --- frontend/public/json/ntfy.json | 47 ++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 frontend/public/json/ntfy.json diff --git a/frontend/public/json/ntfy.json b/frontend/public/json/ntfy.json new file mode 100644 index 00000000..0bc32bbc --- /dev/null +++ b/frontend/public/json/ntfy.json @@ -0,0 +1,47 @@ +{ + "name": "ntfy", + "slug": "ntfy", + "categories": [ + 19 + ], + "date_created": "2024-05-02", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 80, + "documentation": "https://docs.ntfy.sh/", + "website": "https://ntfy.sh/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/ntfy.webp", + "config_path": "/etc/ntfy/server.yml", + "description": "ntfy (pronounced notify) is a simple HTTP-based pub-sub notification service. It allows you to send notifications to your phone or desktop via scripts from any computer, and/or using a REST API. It's infinitely flexible, and 100% free software.", + "install_methods": [ + { + "type": "default", + "script": "ct/ntfy.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 2, + "os": "debian", + "version": "12" + } + }, + { + "type": "alpine", + "script": "ct/alpine-ntfy.sh", + "resources": { + "cpu": 1, + "ram": 256, + "hdd": 2, + "os": "alpine", + "version": "3.22" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [] +} + From 87456e68d83da69f83a317bdfeb0b3618002942a Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Thu, 18 Sep 2025 17:58:49 +0100 Subject: [PATCH 04/13] alpine-ntfy: use setcap and bind to 80 --- ct/alpine-ntfy.sh | 3 ++- install/alpine-ntfy-install.sh | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ct/alpine-ntfy.sh b/ct/alpine-ntfy.sh index 2fdba679..11892490 100644 --- a/ct/alpine-ntfy.sh +++ b/ct/alpine-ntfy.sh @@ -23,12 +23,13 @@ function update_script() { header_info check_container_storage check_container_resources - if [[ ! -d /var ]]; then + if [[ ! -d /etc/ntfy ]]; then msg_error "No ${APP} Installation Found!" exit fi msg_info "Updating $APP LXC" $STD apk -U upgrade + setcap 'cap_net_bind_service=+ep' /usr/bin/ntfy msg_ok "Updated $APP LXC" exit } diff --git a/install/alpine-ntfy-install.sh b/install/alpine-ntfy-install.sh index 85e123e7..0369e896 100644 --- a/install/alpine-ntfy-install.sh +++ b/install/alpine-ntfy-install.sh @@ -14,7 +14,9 @@ network_check update_os msg_info "Installing ntfy" -$STD apk add --no-cache ntfy ntfy-openrc +$STD apk add --no-cache ntfy ntfy-openrc libcap +sed -i '/^listen-http/s/^\(.*\)$/#\1\n/' /etc/ntfy/server.yml # listen on port 80 +setcap 'cap_net_bind_service=+ep' /usr/bin/ntfy # work around permission denied error when binding to :80 $STD rc-update add ntfy default $STD service ntfy start msg_ok "Installed ntfy" From 3a5e03f275614cb0c822a5ecc1129b7be7f817ba Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Thu, 18 Sep 2025 18:00:08 +0100 Subject: [PATCH 05/13] alpine-ntfy: rename app to alpine-ntfy --- ct/alpine-ntfy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-ntfy.sh b/ct/alpine-ntfy.sh index 11892490..f1cf340c 100644 --- a/ct/alpine-ntfy.sh +++ b/ct/alpine-ntfy.sh @@ -5,7 +5,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV # License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE # Source: https://ntfy.sh/ -APP="ntfy" +APP="Alpine-ntfy" var_tags="${var_tags:-notification}" var_cpu="${var_cpu:-1}" var_ram="${var_ram:-256}" From 9c3ff0fda95b2ea93ce411dd77b679d665c7a821 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Thu, 18 Sep 2025 18:00:58 +0100 Subject: [PATCH 06/13] alpine-ntfy: restart ntfy after update --- ct/alpine-ntfy.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ct/alpine-ntfy.sh b/ct/alpine-ntfy.sh index f1cf340c..94e47f77 100644 --- a/ct/alpine-ntfy.sh +++ b/ct/alpine-ntfy.sh @@ -31,6 +31,10 @@ function update_script() { $STD apk -U upgrade setcap 'cap_net_bind_service=+ep' /usr/bin/ntfy msg_ok "Updated $APP LXC" + + msg_info "Restarting ntfy" + rc-service ntfy restart + msg_ok "Restarted ntfy" exit } From d1de6051945f81773d98cdb103b65bb1977a06b5 Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Thu, 18 Sep 2025 18:02:03 +0100 Subject: [PATCH 07/13] alpine-caddy: revert thingy, forgot to change branch n allat --- frontend/public/json/caddy.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/public/json/caddy.json b/frontend/public/json/caddy.json index 607a9f7e..0f59a88d 100644 --- a/frontend/public/json/caddy.json +++ b/frontend/public/json/caddy.json @@ -1,6 +1,6 @@ { - "name": "Caddy", - "slug": "caddy", + "name": "Alpine-Caddy", + "slug": "alpine-caddy", "categories": [ 21 ], From a17c64f39d9f677386f413007bf263d2519cd9aa Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Thu, 18 Sep 2025 18:06:54 +0100 Subject: [PATCH 08/13] alpine-caddy: remove commands, listen on 8080 for now? --- install/alpine-ntfy-install.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/install/alpine-ntfy-install.sh b/install/alpine-ntfy-install.sh index 0369e896..85e123e7 100644 --- a/install/alpine-ntfy-install.sh +++ b/install/alpine-ntfy-install.sh @@ -14,9 +14,7 @@ network_check update_os msg_info "Installing ntfy" -$STD apk add --no-cache ntfy ntfy-openrc libcap -sed -i '/^listen-http/s/^\(.*\)$/#\1\n/' /etc/ntfy/server.yml # listen on port 80 -setcap 'cap_net_bind_service=+ep' /usr/bin/ntfy # work around permission denied error when binding to :80 +$STD apk add --no-cache ntfy ntfy-openrc $STD rc-update add ntfy default $STD service ntfy start msg_ok "Installed ntfy" From 6de1ce5463e8854df9cf0f0fe22c2afcc536314c Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Thu, 18 Sep 2025 18:08:10 +0100 Subject: [PATCH 09/13] alpine-ntfy: revert, and lament using the wrong commit message HAH ohh it was comments, not commands --- install/alpine-ntfy-install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install/alpine-ntfy-install.sh b/install/alpine-ntfy-install.sh index 85e123e7..4fc3f89c 100644 --- a/install/alpine-ntfy-install.sh +++ b/install/alpine-ntfy-install.sh @@ -14,7 +14,9 @@ network_check update_os msg_info "Installing ntfy" -$STD apk add --no-cache ntfy ntfy-openrc +$STD apk add --no-cache ntfy ntfy-openrc libcap +sed -i '/^listen-http/s/^\(.*\)$/#\1\n/' /etc/ntfy/server.yml +setcap 'cap_net_bind_service=+ep' /usr/bin/ntfy $STD rc-update add ntfy default $STD service ntfy start msg_ok "Installed ntfy" From b2239adf2f7edddda2e560395e429559b37be26e Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Thu, 18 Sep 2025 18:17:22 +0100 Subject: [PATCH 10/13] alpine-ntfy: add header --- ct/headers/alpine-ntfy | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ct/headers/alpine-ntfy diff --git a/ct/headers/alpine-ntfy b/ct/headers/alpine-ntfy new file mode 100644 index 00000000..bc416434 --- /dev/null +++ b/ct/headers/alpine-ntfy @@ -0,0 +1,6 @@ + ___ __ _ __ ____ + / | / /___ (_)___ ___ ____ / /_/ __/_ __ + / /| | / / __ \/ / __ \/ _ \______/ __ \/ __/ /_/ / / / + / ___ |/ / /_/ / / / / / __/_____/ / / / /_/ __/ /_/ / +/_/ |_/_/ .___/_/_/ /_/\___/ /_/ /_/\__/_/ \__, / + /_/ /____/ From 7699128a3010f06a3abad124a8599e58ca77d90c Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Thu, 18 Sep 2025 19:06:16 +0100 Subject: [PATCH 11/13] alpine-ntfy: revert header --- ct/headers/alpine-ntfy | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 ct/headers/alpine-ntfy diff --git a/ct/headers/alpine-ntfy b/ct/headers/alpine-ntfy deleted file mode 100644 index bc416434..00000000 --- a/ct/headers/alpine-ntfy +++ /dev/null @@ -1,6 +0,0 @@ - ___ __ _ __ ____ - / | / /___ (_)___ ___ ____ / /_/ __/_ __ - / /| | / / __ \/ / __ \/ _ \______/ __ \/ __/ /_/ / / / - / ___ |/ / /_/ / / / / / __/_____/ / / / /_/ __/ /_/ / -/_/ |_/_/ .___/_/_/ /_/\___/ /_/ /_/\__/_/ \__, / - /_/ /____/ From 19299fdde41da8ae0af1ea65a3d7a5c42c52cca9 Mon Sep 17 00:00:00 2001 From: Cobalt <65132371+cobaltgit@users.noreply.github.com> Date: Fri, 19 Sep 2025 11:29:33 +0100 Subject: [PATCH 12/13] Replace init_error_traps with catch_errors --- install/alpine-ntfy-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/alpine-ntfy-install.sh b/install/alpine-ntfy-install.sh index 4fc3f89c..04aeddc0 100644 --- a/install/alpine-ntfy-install.sh +++ b/install/alpine-ntfy-install.sh @@ -8,7 +8,7 @@ source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" color verb_ip6 -init_error_traps +catch_errors setting_up_container network_check update_os From 2a92cf8c26812d73881e3360021245601539aaf8 Mon Sep 17 00:00:00 2001 From: Cobalt <65132371+cobaltgit@users.noreply.github.com> Date: Fri, 19 Sep 2025 11:29:44 +0100 Subject: [PATCH 13/13] ditto --- ct/alpine-ntfy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/alpine-ntfy.sh b/ct/alpine-ntfy.sh index 94e47f77..4fc65b5d 100644 --- a/ct/alpine-ntfy.sh +++ b/ct/alpine-ntfy.sh @@ -17,7 +17,7 @@ var_unprivileged="${var_unprivileged:-1}" header_info "$APP" variables color -init_error_traps +catch_errors function update_script() { header_info