Skip to content

Instantly share code, notes, and snippets.

@cherts
Created November 6, 2019 11:36
Show Gist options
  • Select an option

  • Save cherts/84dc9b7eaa36fcc6822c274a399ac35a to your computer and use it in GitHub Desktop.

Select an option

Save cherts/84dc9b7eaa36fcc6822c274a399ac35a to your computer and use it in GitHub Desktop.
zabbix-agent.service
[Unit]
Description=Zabbix Agent
After=syslog.target
After=network.target
[Service]
Environment="CONFFILE=/etc/zabbix/zabbix_agentd.conf"
EnvironmentFile=-/etc/default/zabbix-agent
Type=forking
Restart=on-failure
PIDFile=/run/zabbix/zabbix_agentd.pid
KillMode=control-group
ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE
ExecStop=/bin/kill -SIGTERM $MAINPID
RestartSec=10s
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment