feat(agent): systemd unit + release env.sh for root+journald install
This commit is contained in:
parent
d266a7b56c
commit
7ae14f35dd
2 changed files with 25 additions and 0 deletions
3
agent/rel/env.sh.eex
Normal file
3
agent/rel/env.sh.eex
Normal 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')}"
|
||||
22
agent/rel/proxmox-monitor-agent.service
Normal file
22
agent/rel/proxmox-monitor-agent.service
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue