ansible-collection-prometheus/roles/smokeping_prober/templates/smokeping_prober.service.j2

43 lines
1 KiB
Text
Raw Normal View History

{{ ansible_managed | comment }}
[Unit]
Description=Smokeping Prober
After=network-online.target
StartLimitInterval=0
StartLimitIntervalSec=0
[Service]
Type=simple
User={{ smokeping_prober_system_user }}
Group={{ smokeping_prober_system_group }}
PermissionsStartOnly=true
ExecReload=/bin/kill -HUP $MAINPID
ExecStart={{ smokeping_prober_binary_install_dir }}/smokeping_prober \
--config.file={{ smokeping_prober_config_dir }}//{{ smokeping_prober_config_file }} \
--web.listen-address={{ smokeping_prober_web_listen_address }}
SyslogIdentifier=smokeping_prober
KillMode=process
Restart=always
RestartSec=5
LockPersonality=true
NoNewPrivileges=true
MemoryDenyWriteExecute=true
PrivateTmp=true
ProtectHome=true
RemoveIPC=true
RestrictSUIDSGID=true
AmbientCapabilities=CAP_NET_RAW
{% if (ansible_facts.packages.systemd | first).version is version('232', '>=') %}
ProtectControlGroups=true
ProtectKernelModules=true
ProtectKernelTunables=yes
ProtectSystem=strict
{% else %}
ProtectSystem=full
{% endif %}
[Install]
WantedBy=multi-user.target