mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-13 12:15:03 +00:00
feat(healthchecks): add sendalerts service (#11694)
This commit is contained in:
@@ -108,7 +108,7 @@ ${LOCAL_IP} {
|
|||||||
EOF
|
EOF
|
||||||
msg_ok "Configured Caddy"
|
msg_ok "Configured Caddy"
|
||||||
|
|
||||||
msg_info "Creating systemd service"
|
msg_info "Creating systemd services"
|
||||||
cat <<EOF >/etc/systemd/system/healthchecks.service
|
cat <<EOF >/etc/systemd/system/healthchecks.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Healthchecks Service
|
Description=Healthchecks Service
|
||||||
@@ -123,9 +123,23 @@ Restart=always
|
|||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
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
|
systemctl reload caddy
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Services"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|||||||
Reference in New Issue
Block a user