Normaly the shell send a SIGHUP to all child processes on exit.
You might send the domain.sh to background and detach it from the shell using nohup domain.sh 2>&1 >/dev/null &
But if you try to have the domain always running I would prefer to use a start script, see bin/init.d directory for examples. In this case the domain is started on boot without user action
Thank you for the response
In the init.d direcotry i only found
So may be the best is use nohup domain.sh 2>&1 >/dev/null & i give a try !
you might simple copy it and replace all "standalone" ocurrencies with "domain" if you use the standard configurations.
That is the best in my opinion