34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
# =====================================================================
|
|
# Beispiel-Unit (wird von install.sh --with-systemd automatisch
|
|
# mit den korrekten Pfaden erzeugt und nach
|
|
# /etc/systemd/system/checkmk-stack.service geschrieben).
|
|
#
|
|
# Manuell:
|
|
# cp systemd/checkmk-stack.service.example \
|
|
# /etc/systemd/system/checkmk-stack.service
|
|
# # Pfade und Compose-Kommando anpassen
|
|
# systemctl daemon-reload && systemctl enable --now checkmk-stack
|
|
# =====================================================================
|
|
[Unit]
|
|
Description=Checkmk + NGINX Proxy Manager (Container-Stack)
|
|
Wants=network-online.target
|
|
After=network-online.target
|
|
# Nur bei Docker zusaetzlich:
|
|
#Requires=docker.service
|
|
#After=docker.service
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
WorkingDirectory=/opt/checkmk-stack
|
|
EnvironmentFile=/opt/checkmk-stack/.env
|
|
TimeoutStartSec=0
|
|
# Docker: /usr/bin/docker compose up -d
|
|
# Podman: /usr/bin/podman-compose up -d
|
|
ExecStart=/bin/sh -c '/usr/bin/podman-compose up -d'
|
|
ExecStartPost=/opt/checkmk-stack/scripts/cmk-manage.sh start-all-sites
|
|
ExecStop=/bin/sh -c '/usr/bin/podman-compose down'
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|