This a bad commit message. NO idea.
This commit is contained in:
@@ -1,6 +1,20 @@
|
||||
[Unit]
|
||||
Description={{ container_name }} Podman Container
|
||||
After=network.target
|
||||
{% for unit in systemd_After %}
|
||||
After={{ unit }}
|
||||
{% endfor %}
|
||||
{% for unit in systemd_Before %}
|
||||
Before={{ unit }}
|
||||
{% endfor %}
|
||||
{% for unit in systemd_Conflicts %}
|
||||
Conflicts={{ unit }}
|
||||
{% endfor %}
|
||||
{% for unit in systemd_Requires %}
|
||||
Requires={{ unit }}
|
||||
{% endfor %}
|
||||
{% for unit in systemd_Wants %}
|
||||
Wants={{ unit }}
|
||||
{% endfor %}
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
@@ -18,6 +32,7 @@ ExecReload=-/usr/bin/podman pod rm -f {{ container_name }}
|
||||
ExecStop=-/usr/bin/podman pod rm -f {{ container_name }}
|
||||
Restart={{ container_restart }}
|
||||
RestartSec={{ systemd_RestartSec }}
|
||||
Environment=PODMAN_SYSTEMD_UNIT=%n
|
||||
|
||||
[Install]
|
||||
{% if container_run_as_user == 'root' %}
|
||||
@@ -26,3 +41,9 @@ WantedBy=multi-user.target
|
||||
{% if container_run_as_user != 'root' %}
|
||||
WantedBy=default.target
|
||||
{% endif %}
|
||||
{% for unit in systemd_RequiredBy %}
|
||||
RequiredBy={{ unit }}
|
||||
{% endfor %}
|
||||
{% for unit in systemd_WantedBy %}
|
||||
WantedBy={{ unit }}
|
||||
{% endfor %}
|
||||
|
||||
@@ -1,10 +1,26 @@
|
||||
[Unit]
|
||||
Description={{ container_name }} Podman Container
|
||||
After=network.target
|
||||
{% for unit in systemd_After %}
|
||||
After={{ unit }}
|
||||
{% endfor %}
|
||||
{% for unit in systemd_Before %}
|
||||
Before={{ unit }}
|
||||
{% endfor %}
|
||||
{% for unit in systemd_Conflicts %}
|
||||
Conflicts={{ unit }}
|
||||
{% endfor %}
|
||||
{% for unit in systemd_Requires %}
|
||||
Requires={{ unit }}
|
||||
{% endfor %}
|
||||
{% for unit in systemd_Wants %}
|
||||
Wants={{ unit }}
|
||||
{% endfor %}
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
TimeoutStartSec={{ systemd_TimeoutStartSec }}
|
||||
ExecStartPre=-/usr/bin/podman stop -t {{ container_stop_timeout|quote }} {{ container_name|quote }}
|
||||
ExecStartPre=-/usr/bin/podman rm -f {{ container_name|quote }}
|
||||
ExecStartPre=-/usr/bin/rm -f {{ pidfile }} {{ cidfile }}
|
||||
{% if container_run_as_user == 'root' %}
|
||||
User={{ container_run_as_user }}
|
||||
@@ -22,6 +38,7 @@ Restart={{ container_restart }}
|
||||
RestartSec={{ systemd_RestartSec }}
|
||||
KillMode=mixed
|
||||
PIDFile={{ pidfile }}
|
||||
Environment=PODMAN_SYSTEMD_UNIT=%n
|
||||
|
||||
[Install]
|
||||
{% if container_run_as_user == 'root' %}
|
||||
@@ -30,3 +47,9 @@ WantedBy=multi-user.target
|
||||
{% if container_run_as_user != 'root' %}
|
||||
WantedBy=default.target
|
||||
{% endif %}
|
||||
{% for unit in systemd_RequiredBy %}
|
||||
RequiredBy={{ unit }}
|
||||
{% endfor %}
|
||||
{% for unit in systemd_WantedBy %}
|
||||
WantedBy={{ unit }}
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user