tillo
Verified User
Well, is seems to work pretty well.
I think that when you did a restart and had the "Usage: pstree ..." error Apache was already stopped (maybe crashed), and the new command (with "2>/dev/null") will make it silent.
On the other way it's weird that you had the "could not bind to address" error once, this may have been caused by a stuck/zombie process (kill -9 didn't kill it) that took a few minutes to exit, since you were able to restart Apache the second time.
Unfortunately there is no way to fix that, let's hope it doesn't happen again. If it does let me know, I may write an addictional retry function as a workaround.
I think that when you did a restart and had the "Usage: pstree ..." error Apache was already stopped (maybe crashed), and the new command (with "2>/dev/null") will make it silent.
On the other way it's weird that you had the "could not bind to address" error once, this may have been caused by a stuck/zombie process (kill -9 didn't kill it) that took a few minutes to exit, since you were able to restart Apache the second time.
Unfortunately there is no way to fix that, let's hope it doesn't happen again. If it does let me know, I may write an addictional retry function as a workaround.