summaryrefslogtreecommitdiffstats
path: root/helper_scripts/start_stop.sh
blob: 05ed6fab91cafb4b61bb42959dc98bc1b586cb71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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 "$@"