Merge pull request #105 from leemgs/upstream-unknow-flag-removal

feat: add option of launch.sh to avoid unknown flags issue
This commit is contained in:
Brendan Dolan-Gavitt 2022-12-20 17:57:11 -05:00 committed by GitHub
commit ecc47dbf96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,5 +7,29 @@ if [ ! -f .env ]; then
fi fi
source .env source .env
function showhelp () {
# Display Help
echo
echo "Usage: $0 [option...]"
echo "options:"
echo " -h Print this help."
echo " -d Start in daemon mode."
echo
}
while getopts "hd" option; do
case $option in
h)
showhelp
exit;;
d)
options="-d"
;;
\?) # incorrect option
echo "Error: Invalid option"
exit;;
esac
done
# On newer versions, docker-compose is docker compose # On newer versions, docker-compose is docker compose
docker compose up -d --remove-orphans || docker-compose up -d --remove-orphans docker compose up $options --remove-orphans || docker-compose up $options --remove-orphans