{# The service creation form, one mode at a time. The tab buttons swap this whole fragment over htmx, so the active tab, the form and any refusal always agree: there is no client-side state to drift. A refused submission renders at 200 with the problem block above the form and every field holding what the operator typed. Raw mode prefills a complete unit body carrying the WASM marker, because the manager refuses to write a unit without it: prefilling something the backend would reject is a form that teaches the operator to fail. #} {% import "_macros.html" as m %}
{% if sform.problem %} {{ m.problem(sform.problem.fix, sform.problem.output) }} {% endif %}
{% if sform.mode == 'raw' %}
Becomes the unit name, with .service appended.
Written verbatim. Keep the "# {{ sform.marker }}" comment: without it WASM stops recognising the unit as its own and refuses to manage it.
Cancel
{% else %}
Becomes the unit name, with .service appended.
Absolute path to the executable; systemd starts it without a shell.
Leave empty to run as {{ sform.service_user }}, the configured service user. Never defaults to root.
Optional; handed to the process as the PORT environment variable.
Cancel
{% endif %}