From 331f7c31f9047a415c5d182d9eb2dab80920babc Mon Sep 17 00:00:00 2001 From: cobaltgit Date: Thu, 18 Sep 2025 17:58:49 +0100 Subject: [PATCH] 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"