mirror of
https://github.com/samply/bridgehead.git
synced 2025-06-17 02:30:15 +02:00
Monitoring for bridgehead startup and update (#22)
This commit is contained in:
12
bridgehead
12
bridgehead
@ -43,14 +43,16 @@ esac
|
||||
|
||||
# Load variables from /etc/bridgehead and /srv/docker/bridgehead
|
||||
set -a
|
||||
source /etc/bridgehead/$PROJECT.conf
|
||||
fetchVarsFromVaultByFile /etc/bridgehead/$PROJECT.conf || exit 1
|
||||
source /etc/bridgehead/$PROJECT.conf || fail_and_report 1 "/etc/bridgehead/$PROJECT.conf not found"
|
||||
fetchVarsFromVaultByFile /etc/bridgehead/$PROJECT.conf || fail_and_report 1 "Unable to fetchVarsFromVaultByFile"
|
||||
[ -e ./$PROJECT/vars ] && source ./$PROJECT/vars
|
||||
set +a
|
||||
|
||||
case "$ACTION" in
|
||||
start)
|
||||
hc_send log "Bridgehead $PROJECT startup: Checking requirements ..."
|
||||
checkRequirements
|
||||
hc_send log "Bridgehead $PROJECT startup: Requirements checked out. Now starting bridgehead ..."
|
||||
exec docker-compose -f ./$PROJECT/docker-compose.yml up --abort-on-container-exit
|
||||
;;
|
||||
stop)
|
||||
@ -65,8 +67,10 @@ case "$ACTION" in
|
||||
uninstall)
|
||||
exec ./lib/remove-bridgehead-units.sh $PROJECT
|
||||
;;
|
||||
fixPermissions)
|
||||
chown -R bridgehead /etc/bridgehead .
|
||||
preRun | preUpdate)
|
||||
fixPermissions
|
||||
;;
|
||||
postRun | postUpdate)
|
||||
;;
|
||||
*)
|
||||
printUsage
|
||||
|
Reference in New Issue
Block a user