I have scenario like below :
I have a bash file named infra.sh. Inside this infra.sh file I have the below commands:
#!/bin/bash
gnome-terminal -e 'sh -c "bash ./redis-server.sh && sleep 30"'
gnome-terminal -e 'sh -c "bash ./redis-client.sh && sleep 30"'
gnome-terminal -e 'sh -c "bash ./playServer.sh && sleep 30"'
gnome-terminal -e 'sh -c "bash ./proclient-service.sh && sleep 30"'
gnome-terminal -e 'sh -c "bash ./infoServer.sh"'
Now if I execute the infra.sh from a terminal by typing
sudo sh ./infra.sh
then, all the commands above gets executed in separate terminals. They are running.
But I want to make it in such a way that I will start the infra.sh in a manner that all the services will be running in background and as well as the terminal from which I executed the commands for starting infra.sh will also go in background.
Is it possible?
thanks in advance.