Skip to content

Instantly share code, notes, and snippets.

@jonvargas
Created November 24, 2015 02:25
Show Gist options
  • Save jonvargas/e06923fd3ff984947969 to your computer and use it in GitHub Desktop.
Save jonvargas/e06923fd3ff984947969 to your computer and use it in GitHub Desktop.
Zabbix Server systemd's unit file for SUSE Linux Enterprise 12
[Unit]
Description=Zabbix Server
After=syslog.target network.target
[Service]
# Since zabbix forks itself after starting, this is mandatory
Type=forking
# The RuntimeDirectory directive creates the /run/zabbix directory for you,
# but it's supported until systemd version 211, this is 210. As a workaround
# us the next lines meanwhile
# RuntimeDirectory=zabbix
PermissionsStartOnly=true
ExecStartPre=-/bin/mkdir -p /run/zabbix
ExecStartPre=/bin/chown -Rh zabbix:zabbix /run/zabbix
ExecReload=/usr/local/sbin/zabbix_server -R config_cache_reload
ExecStart=/usr/local/sbin/zabbix_server -c /usr/local/etc/zabbix_server.conf
PIDFile=/run/zabbix/zabbix_server.pid
User=zabbix
Group=zabbix
PrivateTmp=yes
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment