Fixed sync_db, not works
Added stop_server functions and process handlers to deploy script