handle SIGTERM for daemonization, as well as SIGINT
Merge pull request #5 from devunt/master

modified some codes
Merge pull request #4 from achimnol/master

Please add SIGTERM handling for daemonization