Files
coredesktop/updates.d/72-sandbox.sh
T
davidandClaude Opus 5.5 475b1d804e Restart Hermes' gateway after updating Hermes
The gateway reads its sandbox rules and loads new dependencies only when it
starts, and hermes update restarts it only for new code. Restart it at the end
of the sandbox update step instead of before hermes update runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 10:01:37 -06:00

24 lines
740 B
Bash

#!/bin/bash
COREDESKTOP="$HOME/.local/share/coredesktop"
run_update() {
local status=0
bash "$COREDESKTOP/sandbox/setup.sh" || status=1
# The real command, not the sandboxed one in sandbox/bin: updating Hermes
# writes outside what its sandbox allows
if [ -x "$HOME/.local/bin/hermes" ]; then
echo "Updating Hermes Agent..."
"$HOME/.local/bin/hermes" update < /dev/null || status=1
fi
# The gateway reads its sandbox rules and loads new dependencies only when it
# starts, and Hermes restarts it only for new code
if systemctl --user is-active --quiet hermes-gateway.service; then
echo "Restarting Hermes' gateway..."
systemctl --user restart hermes-gateway.service || status=1
fi
return $status
}