I have a script that calls a number of other install scripts
./script1.sh 2>&1 | tee script1.log<br> ./script2.sh 2>&1 | tee script2.log<br> ./script3.sh 2>&1 | tee script3.log<br>
They all look ok till the last one which does a call to a custom init script. This init script runs the
/usr/local/daemon &. i.e. puts it into the background.
Combine this with using
tee and the main script hangs as the final
tee never exits.
The init script is a .NET app running under mono so I've very little control over it. If I don't use
tee then it all looks ok. Running the last command from the command line has the same effect.
If anyone can suggest a way of making the script exit cleanly I'd be grateful. For now I've moved the call to the init script out of script3 into the parent script and it works fine but of course it's not logged.