Last active
October 4, 2021 10:42
-
-
Save marvin/5c666df9c378b91769f011d89fa563b0 to your computer and use it in GitHub Desktop.
centos7 Zabbix_agent2 Systemd Service Config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install under /etc/systemd/system/zabbix_agent2.service | |
[Unit] | |
Description=Zabbix Agent 2 | |
After=syslog.target | |
After=network.target | |
[Service] | |
Environment="CONFFILE=/etc/zabbix/zabbix_agentd.conf" | |
EnvironmentFile=-/etc/sysconfig/zabbix-agent | |
Type=simple | |
Restart=on-abort | |
PIDFile=/run/zabbix/zabbix_agentd.pid | |
KillMode=control-group | |
ExecStart=/usr/local/sbin/zabbix_agent2 -c $CONFFILE | |
ExecStop=/bin/kill -SIGTERM $MAINPID | |
RestartSec=10s | |
User=zabbix | |
Group=zabbix | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment