feat(agent): systemd unit + release env.sh for root+journald install

This commit is contained in:
Carsten 2026-04-22 08:27:02 +02:00
parent d266a7b56c
commit 7ae14f35dd
2 changed files with 25 additions and 0 deletions

3
agent/rel/env.sh.eex Normal file
View file

@ -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')}"

View file

@ -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