mirror of
https://github.com/ntop/ntopng.git
synced 2026-07-18 04:06:49 +00:00
24 lines
743 B
SYSTEMD
24 lines
743 B
SYSTEMD
[Unit]
|
|
Description=@APP@ high-speed web-based traffic monitoring and analysis tool
|
|
After=@SERVICE_AFTER@
|
|
Requires=@SERVICE_REQUIRES@
|
|
Wants=@SERVICE_WANTS@
|
|
PartOf=@SERVICE_WANTS@
|
|
|
|
[Service]
|
|
Type=simple
|
|
|
|
# Config restore only available for non instantiated-services
|
|
# ExecStartPre=/bin/sh -c '/usr/bin/ntopng-utils-manage-config -a check-restore && /usr/bin/ntopng-utils-manage-config -a restore || true'
|
|
ExecStartPre=/bin/sh -c '/bin/sed "/^[ ]*-e.*$\\|^[ ]*-G.*\\|^[ ]*--daemon.*\\|^[ ]*--pid.*/s/^/#/" /etc/ntopng/ntopng-%i.conf > /run/ntopng-%i.conf'
|
|
|
|
ExecStart=/usr/bin/ntopng /run/ntopng-%i.conf
|
|
|
|
ExecStopPost=-/bin/rm -rf /run/ntopng-%i.conf /run/ntopng.pid
|
|
|
|
Restart=on-abnormal
|
|
RestartSec=5
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
Alias=
|