Tommi Virtanen 4b47db95bf Move ceph/* to top-level.
This repository used to be a collection of several cookbooks, but this
hasn't been true for a month, since
a77b418b95df8f2b6f56d9a90e47dc62100cdf4d. Simplifies the file layout
and makes this look more like your usual cookbook.

Thanks to Guilhem Lettron <guilhem@lettron.fr>
2012-07-09 15:46:52 -07:00

39 lines
789 B
Bash
Executable File

#! /bin/sh
### BEGIN INIT INFO
# Provides: single
# Required-Start: $remote_fs $named $network $time
# Required-Stop: $remote_fs $named $network $time
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: radosgw
### END INIT INFO
PATH=/sbin:/bin:/usr/bin
. /lib/lsb/init-functions
CLIENT_NAME=client.rgw-`hostname | sed 's/\..*//g'`
USER=www-data
do_start () {
su $USER -c "radosgw -c /etc/ceph/ceph.conf -n $CLIENT_NAME >> /var/log/radosgw/radosgw.log 2>&1 &"
}
case "$1" in
start)
do_start
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
# No-op
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac