diff --git a/install/healthchecks-install.sh b/install/healthchecks-install.sh index d60e1249e..c2857c32f 100644 --- a/install/healthchecks-install.sh +++ b/install/healthchecks-install.sh @@ -108,7 +108,7 @@ ${LOCAL_IP} { EOF msg_ok "Configured Caddy" -msg_info "Creating systemd service" +msg_info "Creating systemd services" cat </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 </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