Browse Source

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.
Tobias Wolf 8 years ago
parent
commit
68e6700663

+ 1 - 0
packaging/deb/systemd/grafana-server.service

@@ -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

+ 1 - 0
packaging/rpm/systemd/grafana-server.service

@@ -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