mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-10-03 00:17:45 -04:00
fix(hermesagent): stop spurious root gateway after update (#17126)
This commit is contained in:
@@ -52,6 +52,11 @@ function update_script() {
|
|||||||
set -a; source /etc/default/hermes; set +a
|
set -a; source /etc/default/hermes; set +a
|
||||||
/home/hermes/.local/bin/hermes update --yes
|
/home/hermes/.local/bin/hermes update --yes
|
||||||
'
|
'
|
||||||
|
# See https://github.com/community-scripts/ProxmoxVE/issues/17123
|
||||||
|
mapfile -t root_gateway_pids < <(ps -eo user=,pid=,args= | awk '$1 == "root" && $0 ~ /\/home\/hermes\/\.hermes\/hermes-agent\/venv\/bin\/python -m hermes_cli\.main gateway run --replace$/ { print $2 }')
|
||||||
|
if ((${#root_gateway_pids[@]})); then
|
||||||
|
kill -TERM "${root_gateway_pids[@]}"
|
||||||
|
fi
|
||||||
chown -R hermes:hermes /home/hermes
|
chown -R hermes:hermes /home/hermes
|
||||||
msg_ok "Updated Hermes Agent"
|
msg_ok "Updated Hermes Agent"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user