Add going to script dir to allow execution from any folder
This commit is contained in:
parent
9ff150ff01
commit
751b37c2c8
1 changed files with 5 additions and 0 deletions
|
@ -16,6 +16,10 @@ checkInput() {
|
|||
done
|
||||
}
|
||||
|
||||
goIntoScriptDirectory() {
|
||||
cd $(dirname "${BASH_SOURCE[0]}")
|
||||
}
|
||||
|
||||
checkForHooks() {
|
||||
test -f "$HOOKS.sh" && HAS_HOOKS=1
|
||||
}
|
||||
|
@ -71,6 +75,7 @@ exitPrematurely() {
|
|||
# Backup the service and call healthchecks
|
||||
backup() {
|
||||
checkInput
|
||||
goIntoScriptDirectory
|
||||
healthStart
|
||||
checkForHooks
|
||||
|
||||
|
|
Loading…
Reference in a new issue