feat(healthchecks): add sendalerts service (#11694)

This commit is contained in:
Mikael Peigney
2026-02-08 18:58:05 +01:00
committed by GitHub
parent 38f2ffed23
commit 8702f81515

View File

@@ -108,7 +108,7 @@ ${LOCAL_IP} {
EOF
msg_ok "Configured Caddy"
msg_info "Creating systemd service"
msg_info "Creating systemd services"
cat <<EOF >/etc/systemd/system/healthchecks.service
[Unit]
Description=Healthchecks Service
@@ -123,9 +123,23 @@ Restart=always
WantedBy=multi-user.target
EOF
systemctl enable -q --now healthchecks caddy
cat <<EOF >/etc/systemd/system/healthchecks-sendalerts.service
[Unit]
Description=Healthchecks Sendalerts Service
After=network.target postgresql.service healthchecks.service
[Service]
WorkingDirectory=/opt/healthchecks/
ExecStart=/opt/healthchecks/venv/bin/python manage.py sendalerts
Restart=always
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now healthchecks healthchecks-sendalerts caddy
systemctl reload caddy
msg_ok "Created Service"
msg_ok "Created Services"
motd_ssh
customize