From 62f37b112863a009d55f06e92c4dc2d8969e7644 Mon Sep 17 00:00:00 2001 From: Richard Ipsum Date: Fri, 17 Apr 2015 10:49:24 +0000 Subject: 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 --- swift/manifest | 1 + swift/usr/lib/systemd/system/rsync.service | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 swift/usr/lib/systemd/system/rsync.service diff --git a/swift/manifest b/swift/manifest index 171b04fc..63ea2c2c 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 00000000..babcfb46 --- /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 -- cgit v1.2.1