mirrorlist: second try to rework unit file
Still based on https://www.redhat.com/sysadmin/podman-shareable-systemd-services Signed-off-by: Adrian Reber <adrian@lisas.de>
This commit is contained in:
parent
906f5c821c
commit
ace91e0f9f
1 changed files with 8 additions and 4 deletions
|
@ -4,11 +4,13 @@ Description=Mirrorlist Container {{ item }}
|
||||||
[Service]
|
[Service]
|
||||||
User=mirrormanager
|
User=mirrormanager
|
||||||
ExecStartPre=-/usr/bin/podman stop -t 1 %n
|
ExecStartPre=-/usr/bin/podman stop -t 1 %n
|
||||||
ExecStartPre=-/usr/bin/podman rm %n --force
|
ExecStartPre=-/usr/bin/sh -c "/usr/bin/podman rm -f `cat %t/user/{{ mirrormanager_uid }}/%n-cid`"
|
||||||
|
ExecStartPre=/usr/bin/rm -f %t/user/{{ mirrormanager_uid }}/%n-pid %t/user/{{ mirrormanager_uid }}/%n-cid
|
||||||
ExecStart=/usr/bin/podman run \
|
ExecStart=/usr/bin/podman run \
|
||||||
--rm=true \
|
--conmon-pidfile %t/user/{{ mirrormanager_uid }}/%n-pid \
|
||||||
|
--cidfile %t/user/{{ mirrormanager_uid }}/%n-cid \
|
||||||
--net=host --userns=keep-id \
|
--net=host --userns=keep-id \
|
||||||
--rm=true --name %n \
|
--rm=true --name %n -d \
|
||||||
-v /usr/share/GeoIP:/usr/share/GeoIP \
|
-v /usr/share/GeoIP:/usr/share/GeoIP \
|
||||||
-v /srv/mirrorlist/data/mirrorlist{{ item }}:/var/lib/mirrormanager \
|
-v /srv/mirrorlist/data/mirrorlist{{ item }}:/var/lib/mirrormanager \
|
||||||
-v /var/log/mirrormanager:/var/log/mirrormanager \
|
-v /var/log/mirrormanager:/var/log/mirrormanager \
|
||||||
|
@ -20,8 +22,10 @@ ExecStart=/usr/bin/podman run \
|
||||||
--port 1808{{ item }} \
|
--port 1808{{ item }} \
|
||||||
--listen 127.0.0.1 \
|
--listen 127.0.0.1 \
|
||||||
-l /var/log/mirrormanager/%n.log
|
-l /var/log/mirrormanager/%n.log
|
||||||
ExecStop=/usr/bin/podman stop -t 1 %n
|
ExecStop=/usr/bin/sh -c "/usr/bin/podman rm -f `cat %t/user/{{ mirrormanager_uid }}/%n-cid`"
|
||||||
KillMode=none
|
KillMode=none
|
||||||
|
Type=forking
|
||||||
|
PIDFile=%t/user/{{ mirrormanager_uid }}/%n-pid
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue