initial code repo
[stor4nfv.git] / src / ceph / src / upstart / radosgw.conf
diff --git a/src/ceph/src/upstart/radosgw.conf b/src/ceph/src/upstart/radosgw.conf
new file mode 100644 (file)
index 0000000..828c314
--- /dev/null
@@ -0,0 +1,26 @@
+description "Ceph radosgw"
+
+start on radosgw
+stop on runlevel [!2345] or stopping radosgw-all
+
+respawn
+respawn limit 5 30
+
+limit nofile 8096 65536
+
+pre-start script
+    set -e
+    test -x /usr/bin/radosgw || { stop; exit 0; }
+    test -d "/var/lib/ceph/radosgw/${cluster:-ceph}-$id" || { stop; exit 0; }
+
+    install -d -m0770 -o ceph -g ceph /var/run/ceph
+end script
+
+instance ${cluster:-ceph}/$id
+export cluster
+export id
+
+# this breaks oneiric
+#usage "cluster = name of cluster (defaults to 'ceph'); id = mds instance id"
+
+exec /usr/bin/radosgw --cluster="${cluster:-ceph}" --id "$id" -f --setuser ceph --setgroup ceph