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