Files
ClawdDotNet/deploy/systemd/clawddotnet-update.service
T
RichardandClaude Opus 5.5 d4b7f34200 #795: Updates aus der WebUI ueber den Instanzmanager
Das Update-Angebot gab es nur im Desktop-Fenster. Der Manager prueft jetzt
selbst und spielt ein: erst alle Instanzen geordnet anhalten, dann
- ohne systemd: update-agent mit --wait-for-pid und --restart,
- unter systemd: clawddotnet-update.service anstossen (Vorlage unter
  deploy/systemd), damit der agent keinen zweiten Manager neben dem
  Dienst startet (DC SETUP_INTEGRATION_GUIDE 4A).
Fehlt die Unit, wird nichts angehalten; scheitert die Uebergabe, kommen
die Instanzen wieder hoch. Anleitung in InstanceSetupGuide Abschnitt 8.

Nebenbei: Sprachpaket wird vor dem Kopf geladen (rohe Schluessel im Kopf).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 20:15:18 +02:00

31 lines
1.5 KiB
Desktop File

# Installs an update for ClawdDotNet, started from the web interface (#795).
#
# Why a unit of its own (Deploymentcenter SETUP_INTEGRATION_GUIDE §4A): started from the
# manager, the update agent would restart the manager itself - a second manager next to
# the service. Here systemd stops the service, the agent updates, and systemd starts the
# service again. The manager only stops its instances and triggers this unit:
# systemctl --user start --no-block clawddotnet-update.service
#
# Install next to clawddotnet-manager.service:
# cp clawddotnet-update.service ~/.config/systemd/user/
# # adjust paths and channel below
# install -m 600 /dev/null ~/.config/clawddotnet/update.env
# echo 'DC_LICENSE_KEY=<your license key>' >> ~/.config/clawddotnet/update.env
# systemctl --user daemon-reload
#
# The license key goes through the environment file (0600), never the command line:
# "ps" shows command lines to every user of the machine.
[Unit]
Description=ClawdDotNet update (stop manager, update, start manager)
[Service]
Type=oneshot
EnvironmentFile=%h/.config/clawddotnet/update.env
TimeoutStartSec=20min
ExecStartPre=/usr/bin/systemctl --user stop clawddotnet-manager.service
ExecStart=%h/clawddotnet/update-agent --action update --project clawddotnet --base-url https://dc.mhdf.de --channel prod --version latest --target-dir %h/clawddotnet --require-signature
# ExecStopPost and not ExecStartPost: it also runs when the update failed. A failed update
# must not leave the manager down.
ExecStopPost=/usr/bin/systemctl --user start clawddotnet-manager.service