#!/bin/sh export FLASK_APP=server.py loc=false noh=false while getopts "ln" opt; do case $opt in l) loc=true ;; n) noh=true ;; \?) echo "Invalid argument" ;; esac done if $loc; then if $noh; then nohup flask run& else flask run fi else if $noh; then nohup flask run --host=0.0.0.0& else flask run -host=0.0.0.0 fi fi