Restart Ignition Gateway service and shutdown the gateway system from perspective client

Hi All,

I have a requirement for Restarting the Gateway service and also shutdown the Gateway server from perspective client using button click.

If any one knows this, can you please post the script .

Thanks in advance
Rajesh

You could use system.util.execute to directly run the gwcmd utility.
https://docs.inductiveautomation.com/display/DOC81/Gateway+Command-line+Utility+-+gwcmd

This is a pretty bad idea, I would say, but that’s probably where I’d start.

2 Likes

Send a message from client to gateway and use system.util.execute in the gateway message handler as @PGriffith noted.

1 Like

Thanks for the response @PGriffith.

Thanks for the suggestion @witman :slight_smile:

Thanks @witman, I was able to write a batch file code as below, and ran it from Gateway scope message handler, and it worked for me, I can able to restart the gateway from perspective button click.

@echo off
set dirpath=%~dp0
cd “C:/Program Files/Inductive Automation/Ignition”
echo Restart gateway…
gwcmd -r

1 Like