diff --git a/agent/rel/env.sh.eex b/agent/rel/env.sh.eex new file mode 100644 index 0000000..d09241e --- /dev/null +++ b/agent/rel/env.sh.eex @@ -0,0 +1,3 @@ +#!/bin/sh +# Default-logs to journald (stdout) when running under systemd +export RELEASE_COOKIE="${RELEASE_COOKIE:-$(head -c 16 /dev/urandom | od -An -tx1 | tr -d ' \n')}" diff --git a/agent/rel/proxmox-monitor-agent.service b/agent/rel/proxmox-monitor-agent.service new file mode 100644 index 0000000..15718a8 --- /dev/null +++ b/agent/rel/proxmox-monitor-agent.service @@ -0,0 +1,22 @@ +[Unit] +Description=Proxmox Monitor Agent +Documentation=https://github.com/you/proxmox_monitor +After=network-online.target zfs.target +Wants=network-online.target + +[Service] +Type=simple +User=root +Environment=AGENT_CONFIG=/etc/proxmox-monitor/agent.toml +ExecStart=/usr/local/bin/proxmox-monitor-agent start +ExecStop=/usr/local/bin/proxmox-monitor-agent stop +Restart=always +RestartSec=5 +# Burrito unpacks into this directory; keep it stable across runs +Environment=BURRITO_CACHE_DIR=/var/cache/proxmox-monitor-agent + +# Resource limits +LimitNOFILE=65536 + +[Install] +WantedBy=multi-user.target