Moved trap('INT') out of else block where it would only be evaluated if the
--detach option was **not** passed. This way, the trap can work for both
detached and not-detached processes. Changed kill command suggestion during
fork/detach to `kill -2`, as that will allow the cleanup method to run
normally and the server to shutdown gracefully.