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.
This commit is contained in:
Tobias Wolf 2017-03-22 16:49:35 +01:00 committed by Torkel Ödegaard
parent 8aa00f9227
commit 68e6700663
2 changed files with 2 additions and 0 deletions

View File

@ -3,6 +3,7 @@ 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

View File

@ -3,6 +3,7 @@ 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/sysconfig/grafana-server