You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to execute a script before the container starts. The ExecStartPre command seems to be exactly what I need for that.
My problem is, that I want to specify the script relative to the container file but Podman actually does not touch the [Service] section and therefore the relative path is not resolved when the actual service file is created. Also the WorkingDirectory is not set by the Quadlet generation, at least not for container files (17177).
For now I'm using %h/.config/containers/systemd as WorkingDirectory which works okayish. Because I put my Quadlet files in subdirectories this is not the whole path but at least I can specify it relative to there.
Is there another way (maybe even with systemd itself) to handle this?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I want to execute a script before the container starts. The
ExecStartPre
command seems to be exactly what I need for that.My problem is, that I want to specify the script relative to the container file but Podman actually does not touch the [Service] section and therefore the relative path is not resolved when the actual service file is created. Also the
WorkingDirectory
is not set by the Quadlet generation, at least not for container files (17177).For now I'm using
%h/.config/containers/systemd
asWorkingDirectory
which works okayish. Because I put my Quadlet files in subdirectories this is not the whole path but at least I can specify it relative to there.Is there another way (maybe even with systemd itself) to handle this?
Beta Was this translation helpful? Give feedback.
All reactions