Hi I have a bash script that needs a conditional execution of a few lines of code based on whether port 80 is already in use:
sudo git fetch origin;
sudo git checkout master;
sudo git pull;
--- if port 80 open
echo Starting Meteor;
export LC_ALL=C;
export ROOT_URL=$ROOT_URL;
sudo meteor --port 80;
--- else
echo Meteor already running;
Then as a cherry on the top since Meteor is a long running process, how do i get it to run in the background and exit the script? (I've tried nohup, &, but i have no idea what the best practice is?)
Thanks so much