deamon.c merged with master. Better stop_service hook handling.