So I have a script that I want to run as root, without hangup and nicely. What order should I put the commands in?
sudo nohup nice foo.bash &
or
nohup nice sudo foo.bash &
etc.
I suspect it doesn't matter but would like some insight from those who really know.
sudo may not respect niceness. At least, it doesn't on my machine (Ubuntu 9.04). Running this:
nice sudo nice
sudo nice nice
prints out 0 and 10. (Note that 'nice' with no command prints out the current niceness.)