|
Packit |
97d9ca |
# To customize, copy this file to /etc/systemd/system and edit there
|
|
Packit |
97d9ca |
#
|
|
Packit |
97d9ca |
# This unit facilitates starting of MRTG. There are 2 options of
|
|
Packit |
97d9ca |
# how to run MRTG:
|
|
Packit |
97d9ca |
# - as a daemon (preferred); in this case please put
|
|
Packit |
97d9ca |
# RunAsDaemon: yes in mrtg.conf (or use --daemon switch)
|
|
Packit |
97d9ca |
# - periodically - please see and enable mrtg.timer
|
|
Packit |
97d9ca |
# Periodic settings need Type=oneshot set here
|
|
Packit |
97d9ca |
#
|
|
Packit |
97d9ca |
# Other recommended settings in mrtg.cfg for daemon mode:
|
|
Packit |
97d9ca |
# NoDetach: yes
|
|
Packit |
97d9ca |
# If you set this, change below Type=simple
|
|
Packit |
97d9ca |
#
|
|
Packit |
97d9ca |
# Please disable /etc/crond.d/mrtg job when using this unit!
|
|
Packit |
97d9ca |
#
|
|
Packit |
97d9ca |
# do not enable both mrtg-as-a-daemon and timer at the same time
|
|
Packit |
97d9ca |
|
|
Packit |
97d9ca |
[Unit]
|
|
Packit |
97d9ca |
Description=Multi-router Traffic Grapher
|
|
Packit |
97d9ca |
After=syslog.target
|
|
Packit |
97d9ca |
|
|
Packit |
97d9ca |
[Service]
|
|
Packit |
97d9ca |
Environment=LANG=C
|
|
Packit |
97d9ca |
ExecStart=/usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok
|
|
Packit |
97d9ca |
# Type= settings cheatsheet:
|
|
Packit |
97d9ca |
# - RunAsDaemon: yes; NoDetach: yes :
|
|
Packit |
97d9ca |
#Type=simple
|
|
Packit |
97d9ca |
# - RunAsDaemon: yes; NoDetach: no :
|
|
Packit |
97d9ca |
#Type=forking
|
|
Packit |
97d9ca |
# - RunAsDaemon: no; (periodic invocation) :
|
|
Packit |
97d9ca |
#Type=oneshot
|
|
Packit |
97d9ca |
Type=simple
|
|
Packit |
97d9ca |
StandardOutput=syslog
|
|
Packit |
97d9ca |
|
|
Packit |
97d9ca |
[Install]
|
|
Packit |
97d9ca |
WantedBy=multi-user.target
|