add daemon support
add basic signal trap to daemon