Fix bashate violations

Change-Id: I31486f7f8de5a410de2847ee1ecfc44ac75bce28
This commit is contained in:
Jesse Pretorius 2015-10-02 16:58:58 +01:00
parent 72982cea66
commit 0464541dae
1 changed files with 5 additions and 5 deletions

View File

@ -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