mirror of
https://github.com/samply/bridgehead.git
synced 2025-06-17 01:20:14 +02:00
Use project name. Add is-running function.
This commit is contained in:
@ -34,7 +34,7 @@ checkOwner(){
|
||||
}
|
||||
|
||||
printUsage() {
|
||||
echo "Usage: bridgehead start|stop|update|install|uninstall|enroll PROJECTNAME"
|
||||
echo "Usage: bridgehead start|stop|is-running|update|install|uninstall|enroll PROJECTNAME"
|
||||
echo "PROJECTNAME should be one of ccp|bbmri"
|
||||
}
|
||||
|
||||
@ -169,6 +169,16 @@ function retry {
|
||||
return 0
|
||||
}
|
||||
|
||||
function bk_is_running {
|
||||
RUNNING="$($COMPOSE -p bridgehead-$PROJECT -f ./$PROJECT/docker-compose.yml $OVERRIDE ps -q)"
|
||||
NUMBEROFRUNNING=$(echo "$RUNNING" | wc -l)
|
||||
if [ $NUMBEROFRUNNING -gt 0 ]; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
##Setting Network properties
|
||||
# currently not needed
|
||||
#export HOSTIP=$(MSYS_NO_PATHCONV=1 docker run --rm --add-host=host.docker.internal:host-gateway ubuntu cat /etc/hosts | grep 'host.docker.internal' | awk '{print $1}');
|
||||
|
Reference in New Issue
Block a user