Handle podman containers as a runit service? #53140
-
|
Hi folks, hope everyone is well. There are any examples of runit services invoking podman containers? I tried a few variations but it only start works ok, stop and restart does not work as expected (it does not kill/stop/restart the container). I am probably missing something basic. So far I have a service that calls a shell script that does the podman invocation. The script: The service: I have seen a few other services using the finish script, not sure if it's the way to handle this. Starting the service: Thanks in advance. EDIT: Format and more info. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Some remarks Your current setup will have bash receive |
Beta Was this translation helpful? Give feedback.
Some remarks
a)
2>&1in a line withexec <program>does essentially nothing, theexec 2>&1before does the redirection alreadyb) You really want to use
exec podmanand not havebashlingering in the middle. (Or just skip thatjellyfin.shscript entirely and just runexec chpt -u user:user podman args...directly inrun.Your current setup will have bash receive
SIGTERM, bash will exit, podman continues to run and runit only ever knew of bash and not podman.