alpine-ntfy: use setcap and bind to 80
This commit is contained in:
parent
0f77489314
commit
331f7c31f9
@ -23,12 +23,13 @@ function update_script() {
|
|||||||
header_info
|
header_info
|
||||||
check_container_storage
|
check_container_storage
|
||||||
check_container_resources
|
check_container_resources
|
||||||
if [[ ! -d /var ]]; then
|
if [[ ! -d /etc/ntfy ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
msg_info "Updating $APP LXC"
|
msg_info "Updating $APP LXC"
|
||||||
$STD apk -U upgrade
|
$STD apk -U upgrade
|
||||||
|
setcap 'cap_net_bind_service=+ep' /usr/bin/ntfy
|
||||||
msg_ok "Updated $APP LXC"
|
msg_ok "Updated $APP LXC"
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,9 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing ntfy"
|
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 rc-update add ntfy default
|
||||||
$STD service ntfy start
|
$STD service ntfy start
|
||||||
msg_ok "Installed ntfy"
|
msg_ok "Installed ntfy"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user