mirrorlist: adapt service file based on official recommendation
This changes the mirrorlist service file to conform to the recommendations given in: https://www.redhat.com/sysadmin/podman-shareable-systemd-services Signed-off-by: Adrian Reber <adrian@lisas.de>
This commit is contained in:
parent
3527d6e494
commit
639bcfd0f5
1 changed files with 7 additions and 2 deletions
|
@ -2,11 +2,14 @@
|
|||
Description=Mirrorlist Container {{ item }}
|
||||
|
||||
[Service]
|
||||
Restart=on-failure
|
||||
User=mirrormanager
|
||||
ExecStartPre=-/usr/bin/podman stop -t 1 %n
|
||||
ExecStartPre=-/usr/bin/podman rm %n --force
|
||||
ExecStartPre=/usr/bin/rm -f /%t/%n-pid /%t/%n-cid
|
||||
ExecStart=/usr/bin/podman run \
|
||||
--rm=true \
|
||||
--conmon-pidfile /%t/%n-pid \
|
||||
--cidfile /%t/%n-cid \
|
||||
--net=host --userns=keep-id \
|
||||
--rm=true --name %n \
|
||||
-v /usr/share/GeoIP:/usr/share/GeoIP \
|
||||
|
@ -20,8 +23,10 @@ ExecStart=/usr/bin/podman run \
|
|||
--port 1808{{ item }} \
|
||||
--listen 127.0.0.1 \
|
||||
-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/%n-cid`"
|
||||
KillMode=none
|
||||
Type=forking
|
||||
PIDFile=/%t/%n-pid
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue