2015-04-08 07:10:04 -05:00
|
|
|
[Unit]
|
2016-09-06 09:29:15 -05:00
|
|
|
Description=Grafana instance
|
2015-04-08 07:10:04 -05:00
|
|
|
Documentation=http://docs.grafana.org
|
|
|
|
Wants=network-online.target
|
|
|
|
After=network-online.target
|
2017-03-22 10:49:35 -05:00
|
|
|
After=postgresql.service mariadb.service mysql.service
|
2015-04-08 07:10:04 -05:00
|
|
|
|
|
|
|
[Service]
|
2015-04-10 04:26:03 -05:00
|
|
|
EnvironmentFile=/etc/default/grafana-server
|
2015-04-08 09:58:05 -05:00
|
|
|
User=grafana
|
|
|
|
Group=grafana
|
|
|
|
Type=simple
|
2016-01-13 06:57:22 -06:00
|
|
|
Restart=on-failure
|
2015-04-10 04:26:03 -05:00
|
|
|
WorkingDirectory=/usr/share/grafana
|
2017-09-04 09:40:42 -05:00
|
|
|
RuntimeDirectory=grafana
|
|
|
|
RuntimeDirectoryMode=0750
|
2017-12-07 08:14:57 -06:00
|
|
|
ExecStart=/usr/sbin/grafana-server \
|
|
|
|
--config=${CONF_FILE} \
|
|
|
|
--pidfile=${PID_FILE_DIR}/grafana-server.pid \
|
2018-11-15 07:42:09 -06:00
|
|
|
--packaging=deb \
|
2017-12-07 08:14:57 -06:00
|
|
|
cfg:default.paths.logs=${LOG_DIR} \
|
|
|
|
cfg:default.paths.data=${DATA_DIR} \
|
|
|
|
cfg:default.paths.plugins=${PLUGINS_DIR} \
|
|
|
|
cfg:default.paths.provisioning=${PROVISIONING_CFG_DIR}
|
2017-12-05 08:44:10 -06:00
|
|
|
|
|
|
|
|
2015-04-08 09:58:05 -05:00
|
|
|
LimitNOFILE=10000
|
2015-04-08 07:10:04 -05:00
|
|
|
TimeoutStopSec=20
|
2021-09-02 07:36:35 -05:00
|
|
|
CapabilityBoundingSet=
|
|
|
|
DeviceAllow=
|
|
|
|
LockPersonality=true
|
|
|
|
MemoryDenyWriteExecute=true
|
|
|
|
NoNewPrivileges=true
|
|
|
|
PrivateDevices=true
|
|
|
|
PrivateTmp=true
|
|
|
|
PrivateUsers=true
|
|
|
|
ProcSubset=pid
|
|
|
|
ProtectClock=true
|
|
|
|
ProtectControlGroups=true
|
|
|
|
ProtectHome=true
|
|
|
|
ProtectHostname=true
|
|
|
|
ProtectKernelLogs=true
|
|
|
|
ProtectKernelModules=true
|
|
|
|
ProtectKernelTunables=true
|
|
|
|
ProtectProc=invisible
|
|
|
|
ProtectSystem=full
|
|
|
|
RemoveIPC=true
|
|
|
|
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
|
|
|
|
RestrictNamespaces=true
|
|
|
|
RestrictRealtime=true
|
|
|
|
RestrictSUIDSGID=true
|
|
|
|
SystemCallArchitectures=native
|
|
|
|
SystemCallFilter=@system-service
|
|
|
|
SystemCallFilter=~@privileged
|
|
|
|
SystemCallFilter=~@resources
|
2015-08-16 11:43:27 -05:00
|
|
|
UMask=0027
|
2015-04-08 07:10:04 -05:00
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|