revert daemon mode baresip and wait for nginx stop