~lynxman/ubuntu/oneiric/swift/swift-upstart

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# swift-container-replicator - SWIFT Container Replicator
#
# The swift container replicator.

description     "SWIFT Container Replicator"
author          "Marc Cluet <marc.cluet@ubuntu.com>"

start on runlevel [2345]
stop on runlevel [016]

pre-start script
  if [ $(find /etc/swift/container-server/ -type f 2>/dev/null | wc -l) -gt 0 ]; then
    exec /usr/bin/swift-init container-replicator start
  else
    exit 1
  fi
end script

post-stop exec /usr/bin/swift-init container-replicator stop