summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2016-02-19 13:08:02 +0000
committerBaserock Gerrit <gerrit@baserock.org>2016-02-22 11:20:43 +0000
commit1f2edd45b03a3e9d86d7c77847612c969b60b86f (patch)
treee3f5dd9754aee523b3398cd541e2f89f374949af
parent54ba90aa3d4830b6321ce6b2f1efe65bc6d3caf8 (diff)
downloadtrove-setup-1f2edd45b03a3e9d86d7c77847612c969b60b86f.tar.gz
Ensure services don't start before /var is mounted
I hit a strange issue after upgrading git.baserock.org where the wrong cgit.css stylesheet was being served. Restarting the lighttpd-git service fixed it. I suspect this might be to do with the service starting before the /var subvolume is mounted. I can't exactly prove it but this change seems sensible in any case. Change-Id: I535305da9ba6135851a38fd3d04c50876de99e21
-rw-r--r--units/git-daemon.service5
-rw-r--r--units/lighttpd-git.service5
-rw-r--r--units/lighttpd-morph-cache.service5
3 files changed, 15 insertions, 0 deletions
diff --git a/units/git-daemon.service b/units/git-daemon.service
index 330169c..fe61257 100644
--- a/units/git-daemon.service
+++ b/units/git-daemon.service
@@ -1,6 +1,11 @@
[Install]
WantedBy=multi-user.target
+# If there's a shared /var subvolume, it must be mounted before this
+# unit runs.
+Requires=local-fs.target
+After=local-fs.target
+
[Unit]
Description=Git Daemon for Trove
After=network.target
diff --git a/units/lighttpd-git.service b/units/lighttpd-git.service
index 94c67a4..69dcc34 100644
--- a/units/lighttpd-git.service
+++ b/units/lighttpd-git.service
@@ -1,6 +1,11 @@
[Install]
WantedBy=multi-user.target
+# If there's a shared /var subvolume, it must be mounted before this
+# unit runs.
+Requires=local-fs.target
+After=local-fs.target
+
[Unit]
Description=Lighttpd Web Server
After=network.target
diff --git a/units/lighttpd-morph-cache.service b/units/lighttpd-morph-cache.service
index c7f76e9..6e2a17a 100644
--- a/units/lighttpd-morph-cache.service
+++ b/units/lighttpd-morph-cache.service
@@ -1,6 +1,11 @@
[Install]
WantedBy=multi-user.target
+# If there's a shared /var subvolume, it must be mounted before this
+# unit runs.
+Requires=local-fs.target
+After=local-fs.target
+
[Unit]
Description=Lighttpd Web Server
After=network.target