mirror of
https://github.com/telemt/telemt.git
synced 2026-10-31 21:02:01 +03:00
Update install.sh #940
This commit is contained in:
+3
-1
@@ -558,7 +558,9 @@ install_binary() {
|
|||||||
|
|
||||||
$SUDO sh -c '[ -x "$1" ]' _ "$bin_dst" || die "$L_ERR_BIN_EXEC $bin_dst"
|
$SUDO sh -c '[ -x "$1" ]' _ "$bin_dst" || die "$L_ERR_BIN_EXEC $bin_dst"
|
||||||
|
|
||||||
if command -v setcap >/dev/null 2>&1; then
|
# File capabilities clear systemd's ambient set and leave firewall helpers unprivileged.
|
||||||
|
# The replaced binary must inherit its capabilities from the service unit instead.
|
||||||
|
if [ "$(get_svc_mgr)" != "systemd" ] && command -v setcap >/dev/null 2>&1; then
|
||||||
$SUDO setcap cap_net_bind_service,cap_net_admin=+ep "$bin_dst" 2>/dev/null || true
|
$SUDO setcap cap_net_bind_service,cap_net_admin=+ep "$bin_dst" 2>/dev/null || true
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user