feat: report version, handle remote upgrade via update-clawd.sh
Made-with: Cursor
This commit is contained in:
@@ -5,6 +5,13 @@ REPO_DIR="/opt/clawd"
|
||||
REMOTE="origin"
|
||||
BRANCH="main"
|
||||
SERVICE="clawd.service"
|
||||
NO_RESTART=false
|
||||
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
--no-restart) NO_RESTART=true ;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo "==> clawd update start"
|
||||
date
|
||||
@@ -41,13 +48,18 @@ else
|
||||
echo "==> No dependency changes, skip npm install"
|
||||
fi
|
||||
|
||||
echo "==> Current commit:"
|
||||
git log --oneline -1
|
||||
|
||||
if [ "$NO_RESTART" = true ]; then
|
||||
echo "==> --no-restart: skip systemctl restart (caller handles restart)"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "==> Restarting service: $SERVICE"
|
||||
systemctl restart "$SERVICE"
|
||||
|
||||
echo "==> Service status:"
|
||||
systemctl status "$SERVICE" --no-pager -l || true
|
||||
|
||||
echo "==> Current commit:"
|
||||
git log --oneline -1
|
||||
|
||||
echo "==> clawd update done"
|
||||
Reference in New Issue
Block a user