Fix bashate violations
Change-Id: I31486f7f8de5a410de2847ee1ecfc44ac75bce28
This commit is contained in:
parent
72982cea66
commit
0464541dae
@ -21,25 +21,25 @@ LOCKFILE="/var/run/neutron_ha_tool.lock"
|
||||
# Trap any errors that might happen in executing the script
|
||||
trap my_trap_handler ERR
|
||||
|
||||
function my_trap_handler() {
|
||||
function my_trap_handler {
|
||||
kill_job
|
||||
}
|
||||
|
||||
function unlock() {
|
||||
function unlock {
|
||||
rm "${LOCKFILE}"
|
||||
}
|
||||
|
||||
function do_job() {
|
||||
function do_job {
|
||||
# Do a given job
|
||||
logger "$({{ do_job }})"
|
||||
}
|
||||
|
||||
function cooldown() {
|
||||
function cooldown {
|
||||
# Sleep for a given amount of time
|
||||
sleep {{ sleep_time }}
|
||||
}
|
||||
|
||||
function kill_job() {
|
||||
function kill_job {
|
||||
# If the job needs killing kill the pid and unlock the file.
|
||||
PID="$(cat ${LOCKFILE})"
|
||||
unlock
|
||||
|
Loading…
Reference in New Issue
Block a user