comparing bash strings correctly
This commit is contained in:
parent
c17abbea6e
commit
56ca814ebb
|
@ -4,14 +4,16 @@ if [[ $# -eq 0 ]] ; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $1 -eq "up" ]] ; then
|
if [ "$1" == "up" ] ; then
|
||||||
echo "Initializing Docker Sync";
|
echo "Initializing Docker Sync";
|
||||||
docker-sync start;
|
docker-sync start;
|
||||||
echo "Initializing Docker Compose";
|
echo "Initializing Docker Compose";
|
||||||
docker-compose -f docker-compose.yml -f docker-compose.sync.yml up -d nginx mysql;
|
docker-compose -f docker-compose.yml -f docker-compose.sync.yml up -d nginx mysql;
|
||||||
else
|
elif [ "$1" == "down" ]; then
|
||||||
echo "Stopping Docker Compose";
|
echo "Stopping Docker Compose";
|
||||||
docker-compose down;
|
docker-compose down;
|
||||||
echo "Stopping Docker Sync";
|
echo "Stopping Docker Sync";
|
||||||
docker-sync stop;
|
docker-sync stop;
|
||||||
|
else
|
||||||
|
echo "Invalid arguments. Use 'up' or 'down'";
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue