Skip to content

Commit 83086cb

Browse files
committed
Fixe typo and bad printing on script execution
1 parent 5aabc4c commit 83086cb

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

cluster/cluster_bash.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func (cluster *Cluster) BashScriptAlert(alert alert.Alert) error {
2323
cluster.LogModulePrintf(cluster.Conf.Verbose, config.ConstLogModGeneral, "ERROR", "%s", err)
2424
}
2525

26-
cluster.LogModulePrintf(cluster.Conf.Verbose, config.ConstLogModGeneral, "INFO", "Alert script complete:", string(out))
26+
cluster.LogModulePrintf(cluster.Conf.Verbose, config.ConstLogModGeneral, "INFO", "Alert script complete: %s", string(out))
2727
}
2828
return nil
2929
}
@@ -37,7 +37,7 @@ func (cluster *Cluster) BashScriptOpenSate(state state.State) error {
3737
cluster.LogModulePrintf(cluster.Conf.Verbose, config.ConstLogModGeneral, "ERROR", "%s", err)
3838
}
3939

40-
cluster.LogModulePrintf(cluster.Conf.Verbose, config.ConstLogModGeneral, "INFO", "Opee state script complete:", string(out))
40+
cluster.LogModulePrintf(cluster.Conf.Verbose, config.ConstLogModGeneral, "INFO", "Open state script complete: %s", string(out))
4141
}
4242
return nil
4343
}
@@ -50,7 +50,7 @@ func (cluster *Cluster) BashScriptCloseSate(state state.State) error {
5050
cluster.LogModulePrintf(cluster.Conf.Verbose, config.ConstLogModGeneral, "ERROR", "%s", err)
5151
}
5252

53-
cluster.LogModulePrintf(cluster.Conf.Verbose, config.ConstLogModGeneral, "INFO", "Close state script complete:", string(out))
53+
cluster.LogModulePrintf(cluster.Conf.Verbose, config.ConstLogModGeneral, "INFO", "Close state script complete %s:", string(out))
5454
}
5555
return nil
5656
}

share/scripts/closestate.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
# This script is given as sample and will be overwrite on upgrade
3+
4+
echo "Close state script args"
5+
echo "Script:$0, Cluster:$1, Server:$2, Code:$3"
6+

share/scripts/openstate.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
# This script is given as sample and will be overwrite on upgrade
3+
4+
echo "Open state script args"
5+
echo "Script:$0, Cluster:$1, Server:$2, Code:$3"
6+
7+

0 commit comments

Comments
 (0)