Update restart_gateway.js

updated restart gateway function.