/services/{name}
0.2.0Unchanged since publicationConfigure monitoring and startup at boot for a daemon
settingsallSupply at least one setting for an installed daemon. UrbeStack applies the supplied settings together. The watched field controls whether the monitor watches the daemon. UrbeStack always watches its own daemons.
The rounds field sets how many consecutive rounds without an answer trigger a restart, from 1 to 10. The timeout field sets the health check timeout, from 1 to 30 seconds. Set depth to answer for a service-specific health check or process to check only whether the process is running.
Set at_boot to true to enable startup at boot without starting the daemon now. If the daemon already starts at boot, UrbeStack rejects the request and discards any monitoring settings supplied with it. A false value for at_boot has no effect.
Invalid name syntax, invalid rounds, timeout, or depth values, and requests without an applicable setting return HTTP 400.
As a command
Run as root on the serverParameters
namepath ·string, matching ^[a-z][a-z0-9.-]{0,39}$Requiredat_bootbooleandepthstring, one of answer, processroundsinteger, 1 to 10timeoutinteger, 1 to 30watchedbooleanExample
See the API overview for how to set $API and $TOKEN.curl -sS -X PATCH "$API/services/alice" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"at_boot": true,
"depth": "answer",
"rounds": 1,
"timeout": 1,
"watched": true
}'200 OK{
"daemon": {
"at_boot": true,
"check": {
"ok": true,
"words": "text"
},
"checked_by": "text",
"cuts": "text",
"depth": "answer",
"falls_30d": 1,
"group": "Panel",
"guard": 1,
"has_log": true,
"installed": true,
"last_check_at": "text",
"last_check_words": "text",
"last_restart_at": "text",
"may_disable": true,
"may_stop": true,
"name": "alice",
"need": "text",
"pid": 1,
"role": "user",
"rounds": 1,
"since": "text",
"state": "up",
"stopped_at": "text",
"stopped_by": "text",
"stopped_from": "text",
"systemd_restarts": 1,
"timeout": 1,
"unit": "text",
"version": "0.0.1",
"watched": true
}
}Errors
13 errors, each a status and a sentence400--name is required400--watched is on or off400<name> already starts at boot400<name> is not installed on this server400A daemon is named with letters, digits, dots and hyphens400Invalid boolean400Nothing to set: give --watched, --rounds, --timeout, --depth or --at-boot400The check waits 400The depth is answer (a service-specific health check) or process (process only)400The panel's own daemons are always watched400The rounds without an answer before a restart are 400body needs one of watched, rounds, timeout, depth, at_boot401Authentication requiredurbestack.com/docs/api/patch-services-name/