summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richard.ipsum@codethink.co.uk>2015-04-17 10:49:24 (GMT)
committerRichard Ipsum <richard.ipsum@codethink.co.uk>2015-04-17 11:20:28 (GMT)
commit62f37b112863a009d55f06e92c4dc2d8969e7644 (patch)
tree4fb2a89afa3d1411862db3cb0d12a236daedf9e4
parentb2d0191973a757559115b6f1a65a73507e47b57b (diff)
downloaddefinitions-62f37b112863a009d55f06e92c4dc2d8969e7644.tar.gz
Add custom rsync unit for swift
Our rsync config is created at first-boot, swift-storage-setup creates the rsync config, so rsync needs to be started after it. This unit is based on upstream's unit, the only difference is we wait for swift-storage-setup and we set Restart=on-failure Change-Id: Idc468fc7886d3491ff49b5f30f1f16f9894255a6
-rw-r--r--swift/manifest1
-rw-r--r--swift/usr/lib/systemd/system/rsync.service11
2 files changed, 12 insertions, 0 deletions
diff --git a/swift/manifest b/swift/manifest
index 171b04f..63ea2c2 100644
--- a/swift/manifest
+++ b/swift/manifest
@@ -12,3 +12,4 @@
0100644 0 0 /usr/lib/systemd/system/swift-storage-setup.service
0100644 0 0 /usr/lib/systemd/system/swift-storage.service
template 0100644 0 0 /etc/ntp.conf
+overwrite 0100644 0 0 /usr/lib/systemd/system/rsync.service
diff --git a/swift/usr/lib/systemd/system/rsync.service b/swift/usr/lib/systemd/system/rsync.service
new file mode 100644
index 0000000..babcfb4
--- /dev/null
+++ b/swift/usr/lib/systemd/system/rsync.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=fast remote file copy program daemon
+After=swift-storage-setup.service
+ConditionPathExists=/etc/rsyncd.conf
+
+[Service]
+ExecStart=/usr/bin/rsync --daemon --no-detach
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target