generated from NethServer/ns8-kickstart
/
roundcubemail.service
36 lines (32 loc) · 1.16 KB
/
roundcubemail.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#
# Copyright (C) 2022 Nethesis S.r.l.
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
# This systemd unit starts a roundcubemail instance using Podman.
# Most parts of this file come from podman-generate-systemd.
#
[Unit]
Description=Podman roundcubemail.service
Requires=mariadb-app.service roundcubemail-app.service
Before=mariadb-app.service roundcubemail-app.service
[Service]
Environment=PODMAN_SYSTEMD_UNIT=%n
EnvironmentFile=-%S/state/environment
Restart=always
TimeoutStopSec=70
ExecStartPre=/bin/rm -f %t/roundcubemail.pid %t/roundcubemail.pod-id
ExecStartPre=/usr/bin/podman pod create --infra-conmon-pidfile %t/roundcubemail.pid \
--pod-id-file %t/roundcubemail.pod-id \
--name roundcubemail \
--publish 127.0.0.1:${TCP_PORT}:80 \
--network=slirp4netns:allow_host_loopback=true \
--add-host=accountprovider:10.0.2.2 \
--replace
ExecStart=/usr/bin/podman pod start --pod-id-file %t/roundcubemail.pod-id
ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/roundcubemail.pod-id -t 10
ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/roundcubemail.pod-id
PIDFile=%t/roundcubemail.pid
Type=forking
[Install]
WantedBy=default.target