# Installed to ~/.config/systemd/user/ by scripts/install_service.sh, which # substitutes @REPO_ROOT@. Edit this template, never the installed copy. [Unit] Description=Restart signal-cli-rest-api when it can no longer reach Signal Documentation=file://@REPO_ROOT@/README.md After=docker.service Wants=docker.service [Service] Type=oneshot WorkingDirectory=@REPO_ROOT@ # PHONE_NUMBER, API_BASE_URL and BIND_PORT come from the same file the bot # reads, so the watchdog can never probe a different account than the bot. EnvironmentFile=@REPO_ROOT@/.env ExecStart=@REPO_ROOT@/scripts/signal_api_watchdog.sh # A oneshot under a timer has no memory of its own: the failure counter and # the restart history have to live somewhere that survives the exit. StateDirectory=signal-api-watchdog # Deliberately NOT ProtectHome: StateDirectory for a user unit writes under # $HOME/.local/state, which a read-only home would make fail. NoNewPrivileges=true