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
 | 
					  done
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					goIntoScriptDirectory() {
 | 
				
			||||||
 | 
					  cd $(dirname "${BASH_SOURCE[0]}")
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
checkForHooks() {
 | 
					checkForHooks() {
 | 
				
			||||||
  test -f "$HOOKS.sh" && HAS_HOOKS=1
 | 
					  test -f "$HOOKS.sh" && HAS_HOOKS=1
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -71,6 +75,7 @@ exitPrematurely() {
 | 
				
			||||||
# Backup the service and call healthchecks
 | 
					# Backup the service and call healthchecks
 | 
				
			||||||
backup() {
 | 
					backup() {
 | 
				
			||||||
  checkInput
 | 
					  checkInput
 | 
				
			||||||
 | 
					  goIntoScriptDirectory
 | 
				
			||||||
  healthStart
 | 
					  healthStart
 | 
				
			||||||
  checkForHooks
 | 
					  checkForHooks
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue