cleanup systemd files
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Robert Kaussow 2022-06-28 22:52:45 +02:00
parent c255d1ea58
commit 597f6c2cda
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 15 additions and 13 deletions

View File

@ -5,6 +5,8 @@
Description=FreshRSS App Server
Wants=network.target network-online.target
After=network-online.target
RequiresMountsFor=%t/containers
Requires=dbus.socket
BindsTo={{ __freshrss_pod_name }}.service
@ -13,20 +15,22 @@ After={{ __freshrss_pod_name }}.service
[Service]
Type=notify
NotifyAccess=all
KillMode=control-group
Environment=PODMAN_SYSTEMD_UNIT=%N
SyslogIdentifier=%N
LogExtraFields=CONTAINER_NAME=%N
Delegate=memory pids
Restart=always
RestartSec=15s
Restart=on-failure
TimeoutSec=70
ExecStartPre=/usr/bin/podman rm --force --ignore {{ __freshrss_container_name }}
ExecStartPre=/usr/bin/podman pod exists {{ __freshrss_pod_name }}
ExecStartPre=/usr/bin/podman create \
ExecStart=/usr/bin/podman run \
--rm \
--replace \
--detach \
--restart=no \
--cgroups=no-conmon \
--sdnotify=conmon \
--env-file={{ __freshrss_systemd_env_dir }}/freshrss.env \
--pod {{ __freshrss_pod_name }} \
{% if freshrss_memory_limit is defined %}
@ -38,7 +42,6 @@ ExecStartPre=/usr/bin/podman create \
{% if freshrss_cpu_quota is defined %}
--cpu-quota={{ freshrss_cpu_quota }} \
{% endif %}
--sdnotify=conmon \
{% for item in freshrss_security_opt %}
--security-opt={{ item }} \
{% endfor %}
@ -55,8 +58,7 @@ ExecStartPre=/usr/bin/podman create \
--name={{ __freshrss_container_name }} \
{{ freshrss_image }}
ExecStart=/usr/bin/podman start {{ __freshrss_container_name }}
ExecStop=/usr/bin/podman stop --ignore -t 10 {{ __freshrss_container_name }}
ExecStop=/usr/bin/podman stop --ignore {{ __freshrss_container_name }}
ExecStopPost=/usr/bin/podman rm --force --ignore {{ __freshrss_container_name }}
[Install]

View File

@ -6,22 +6,22 @@ Description=FreshRSS Pod
Wants=network.target network-online.target
After=network-online.target
RequiresMountsFor=
Requires=dbus.socket {{ __freshrss_container_name }}.service
Before={{ __freshrss_container_name }}.service
[Service]
Type=forking
KillMode=control-group
Environment=PODMAN_SYSTEMD_UNIT=%N
SyslogIdentifier=%N
LogExtraFields=CONTAINER_NAME=%N
Delegate=memory pids
Restart=always
RestartSec=15s
Restart=on-failure
TimeoutSec=70
ExecStartPre=/usr/bin/podman pod rm --force --ignore {{ __freshrss_pod_name }}
ExecStartPre=/usr/bin/podman pod create \
--replace \
{% for port in freshrss_exposed_ports %}
--publish {{ port }} \
{% endfor %}