fix: remove service file rewrite from update-clawd.sh; bump to 1.3.1

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
stswangzhiping
2026-05-04 20:17:19 +08:00
parent c3dd87f635
commit 811c1be3b9
2 changed files with 1 additions and 51 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "clawd",
"version": "1.3.0",
"version": "1.3.1",
"description": "Claw Box daemon - connects local Linux box to claw.cutos.ai via WebSocket",
"main": "lib/client.js",
"bin": {

View File

@@ -71,56 +71,6 @@ fi
echo "==> Current commit:"
git log --oneline -1
NODE_BIN=$(command -v node)
INSTALL_DIR="/opt/clawd"
CONFIG_DIR="/etc/clawd"
ENV_FILE="$CONFIG_DIR/env"
SERVICE_FILE="/etc/systemd/system/$SERVICE"
echo "==> Writing service file: $SERVICE_FILE"
cat > "$SERVICE_FILE" <<EOF
[Unit]
Description=Claw Box Daemon
Documentation=https://git.cutos.ai/claw-daemon/clawd
After=NetworkManager.service
Wants=NetworkManager.service
[Service]
Type=simple
NotifyAccess=all
EnvironmentFile=$ENV_FILE
ExecStart=$NODE_BIN $INSTALL_DIR/bin/clawd.js
WorkingDirectory=$INSTALL_DIR
Restart=always
RestartSec=5
StartLimitInterval=300
StartLimitBurst=10
TimeoutStopSec=10
KillMode=mixed
KillSignal=SIGTERM
MemoryMax=256M
CPUQuota=50%
TasksMax=64
ProtectSystem=full
ReadWritePaths=$CONFIG_DIR /tmp /etc/hosts /etc/hostname
StandardOutput=journal
StandardError=journal
SyslogIdentifier=clawd
WatchdogSec=60
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
echo "==> daemon-reload done"
if [ "$NO_RESTART" = true ]; then
echo "==> --no-restart: skip systemctl restart (caller handles restart)"
exit 0