feat: script and exec runtimes with configurable shell

Add runtime: script (shell file, default /bin/bash, optional stop_script) and runtime: exec (executable with args, optional stop_executable). Both support service_type simple|oneshot and working_dir.
This commit is contained in:
2026-10-12 19:45:54 +02:00
parent 173b4b2523
commit 95143dd998
5 changed files with 251 additions and 1 deletions
+8 -1
View File
@@ -54,7 +54,7 @@ users: [] # root only: rootless users scanned by syncup
units:
- name: nginx
runtime: podman # podman | docker
runtime: podman # podman | docker | script | exec
user: "" # empty = system unit; set for rootless user unit
command: "" # override ExecStart entirely
order: 1 # startup order, lower = earlier; same = parallel
@@ -69,6 +69,13 @@ units:
working_dir: "" # stack: compose dir (from labels)
compose_files: [] # stack: relative to working_dir
compose_bin: "" # stack: podman-compose path
script: "" # script: file run via shell (ExecStart)
stop_script: "" # script: optional ExecStop
shell: "" # script: interpreter, default /bin/bash
executable: "" # exec: binary run as ExecStart
args: [] # exec: arguments
stop_executable: "" # exec: optional ExecStop
service_type: "" # script/exec: simple (default) | oneshot
```
Non-root runs use `~/.config/unitdore/units.yaml` and manage only own user units.