WFCORE-194 Improve Debian/Ubuntu init.d shutdown process

The init.d script for Debian/Ubuntu can be improved in the way it shutdown the server...

If some process hang up, the actual script don't handle that scenario.

In some weird scenario happens that the restart stops the server but in the moment it start again it detects that is still up, a 1 second wait is minimal to avoid that, even if it's weird and sporadic, simply don't happen.

I have been using this in production so this is tested in real life. I really don't mind a 1 second delay if that avoids the need of manually start the server again.

But if you guys think this is not necessary I can remove the delay.