summaryrefslogtreecommitdiffstats
path: root/helper_scrips/start_stop.sh
diff options
context:
space:
mode:
Diffstat (limited to 'helper_scrips/start_stop.sh')
-rwxr-xr-xhelper_scrips/start_stop.sh31
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