What is the scripting necessary to have button in the vision client to restart the gateway?
There’s no direct script that can do this. You would need to use a gateway message handler that called out to an external executable that ran the (platform dependent) service restart action.
Curious why you would want to restart from a client.
We have run into situations where ignition requires a restart to resolve an issue. When logging into Linux via SSH to restart, elevated privileges (sudo) are required. This ability is limited to a select group due to security concerns with admin/root permissions on a server. We can better manage access via a vision client and it meets security guidelines.
Alternatively, even from the Gateway web page would be acceptable.
I would have started with this. I’m zero help with Linux, but @pturmel can definitely help. I’d also try and fix the reason to need to restart in the first place.
So, in this situation, I would recommend calling the gwcmd tool from a gateway message handler. The client would trigger this by calling system.util.sendMesssage() from a suitably secured button’s
Use EAM module. You can run a restart task from scripting. (system.eam.runTask - Ignition User Manual 8.1 - Ignition Documentation)
You will need to write the bash and the execute it with system.util.execute - Ignition User Manual 8.0 - Ignition Documentation (inductiveautomation.com)