grafana/packaging/deb/systemd/grafana-server.service
Tobias Wolf 68e6700663 Add an After= DB ordering relation to systemd .service (#7903)
In systemd `After=` merely codes an ordering relation and does not start
other units.

Grafana needs to specify that it wants to start up _after_ either of the
supported DB services have started, _if they start_.

Enabling the database services, however, is out of scope for Grafana.
2017-03-22 16:49:35 +01:00

27 lines
828 B
Desktop File

[Unit]
Description=Grafana instance
Documentation=http://docs.grafana.org
Wants=network-online.target
After=network-online.target
After=postgresql.service mariadb.service mysql.service
[Service]
EnvironmentFile=/etc/default/grafana-server
User=grafana
Group=grafana
Type=simple
Restart=on-failure
WorkingDirectory=/usr/share/grafana
ExecStart=/usr/sbin/grafana-server \
--config=${CONF_FILE} \
--pidfile=${PID_FILE} \
cfg:default.paths.logs=${LOG_DIR} \
cfg:default.paths.data=${DATA_DIR} \
cfg:default.paths.plugins=${PLUGINS_DIR}
LimitNOFILE=10000
TimeoutStopSec=20
UMask=0027
[Install]
WantedBy=multi-user.target