set signal handlers for SIGTERM/SIGINT
add pid cli flag
improve init script to use openwrt lib