yankeguo / minit

The missing init daemon for container
MIT License
3 stars 1 forks source link

Mark some units as "must succeed" #12

Closed dani closed 3 months ago

dani commented 8 months ago

On some containers, I have scripts which run before anything else (create directories, wait for services to be available etc.) I tried to hook this into a "once" unit, but the problem is that if the unit fails (exit code != 0), minit still proceed with the other units (daemon & cron) It'd be useful to be able to mark a unit so that if it fails, the whole container fails, eg

kind: once
command: /entrypoint.sh
valid_code:
  - 0
die_on_error: true