UFO is openstack-swift (currently essex, 1.4.8), patched to add hooks for GlusterFS plug-ins. N.B. Gluster's changes to swift have been submitted to upstream, and when a new version of swift containing the hooks is released then this patched version will be removed from the GlusterFS packaging.
80 lines
1.4 KiB
Bash
Executable File
80 lines
1.4 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
### BEGIN INIT INFO
|
|
# Provides: gluster-swift-proxy
|
|
# Required-Start: $remote_fs
|
|
# Required-Stop: $remote_fs
|
|
# Default-Stop: 0 1 6
|
|
# Short-Description: Swift proxy server
|
|
# Description: Account server for swift.
|
|
### END INIT INFO
|
|
|
|
# gluster-swift-proxy: swift proxy server
|
|
#
|
|
# chkconfig: - 20 80
|
|
# description: Proxy server for swift.
|
|
|
|
. /etc/rc.d/init.d/functions
|
|
. /usr/share/gluster-swift/functions
|
|
|
|
name="proxy"
|
|
|
|
[ -e "/etc/sysconfig/gluster-swift-$name" ] && . "/etc/sysconfig/gluster-swift-$name"
|
|
|
|
lockfile="/var/lock/subsys/gluster-swift-proxy"
|
|
|
|
start() {
|
|
swift_action "$name" start
|
|
retval=$?
|
|
[ $retval -eq 0 ] && touch $lockfile
|
|
return $retval
|
|
}
|
|
|
|
stop() {
|
|
swift_action "$name" stop
|
|
retval=$?
|
|
[ $retval -eq 0 ] && rm -f $lockfile
|
|
return $retval
|
|
}
|
|
|
|
restart() {
|
|
stop
|
|
start
|
|
}
|
|
|
|
rh_status() {
|
|
swift_action "$name" status
|
|
}
|
|
|
|
rh_status_q() {
|
|
rh_status &> /dev/null
|
|
}
|
|
|
|
|
|
case "$1" in
|
|
start)
|
|
rh_status_q && exit 0
|
|
$1
|
|
;;
|
|
stop)
|
|
rh_status_q || exit 0
|
|
$1
|
|
;;
|
|
restart)
|
|
$1
|
|
;;
|
|
reload)
|
|
;;
|
|
status)
|
|
rh_status
|
|
;;
|
|
condrestart|try-restart)
|
|
rh_status_q || exit 0
|
|
restart
|
|
;;
|
|
*)
|
|
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart}"
|
|
exit 2
|
|
esac
|
|
exit $?
|