main: handle SIGTERM
Merge pull request #4 from cyphermox/master

main: handle SIGTERM