diff options
author | Raghavendra Bhat <raghavendrabhat@gluster.com> | 2011-09-13 17:09:34 +0530 |
---|---|---|
committer | Raghavendra Bhat <raghavendrabhat@gluster.com> | 2011-09-13 17:09:34 +0530 |
commit | 9f10e75b5cd5ef1dc2a0d166d6de6f8c0ef662a0 (patch) | |
tree | 16e7e1b9ebe87d2e4e0c3a37bfa477897ecadc75 /helper_scrips/start_stop.sh | |
parent | 2bd023293d115a68f5f81376d9ba1378f4ee7808 (diff) |
some helper scripts for glusterfs installation and setup
Diffstat (limited to 'helper_scrips/start_stop.sh')
-rwxr-xr-x | helper_scrips/start_stop.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/helper_scrips/start_stop.sh b/helper_scrips/start_stop.sh new file mode 100755 index 0000000..83ad1bf --- /dev/null +++ b/helper_scrips/start_stop.sh @@ -0,0 +1,31 @@ +#!/bin/bash + + +function _init () +{ + set -u; + volume_name=$1; +} + +function start_and_stop () +{ + while true; + do + gluster --mode=script volume stop $volume_name; + sleep 1; + gluster volume start $volume_name; + sleep 1; + done + + return 0; +} + +function main () +{ + + start_and_stop; + + return 0; +} + +_init "$@" && main "$@"
\ No newline at end of file |