# Restart Gateway from Vision Client

**URL:** <https://forum.inductiveautomation.com/t/restart-gateway-from-vision-client/49166>\
**Category:** Ignition\
**Created:** [July 24, 2021, 12:46pm UTC](https://forum.inductiveautomation.com/t/restart-gateway-from-vision-client/49166 "2021-07-24T12:46:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rick.Schendel](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@Rick.Schendel](https://forum.inductiveautomation.com/u/Rick.Schendel)\
**Post date:** [July 24, 2021, 12:46pm UTC](https://forum.inductiveautomation.com/t/restart-gateway-from-vision-client/49166/1 "2021-07-24T12:46:33Z")

</div>

What is the scripting necessary to have button in the vision client to restart the gateway?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 24, 2021, 1:50pm UTC](https://forum.inductiveautomation.com/t/restart-gateway-from-vision-client/49166/2 "2021-07-24T13:50:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [July 24, 2021, 8:31pm UTC](https://forum.inductiveautomation.com/t/restart-gateway-from-vision-client/49166/3 "2021-07-24T20:31:08Z")

</div>

Curious why you would want to restart from a client.

---

<div class="post-metadata">

**Author:** ![Rick.Schendel](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@Rick.Schendel](https://forum.inductiveautomation.com/u/Rick.Schendel)\
**Post date:** [July 24, 2021, 8:36pm UTC](https://forum.inductiveautomation.com/t/restart-gateway-from-vision-client/49166/4 "2021-07-24T20:36:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Rick.Schendel](https://avatars.discourse-cdn.com/v4/letter/r/839c29/32.png) [@Rick.Schendel](https://forum.inductiveautomation.com/u/Rick.Schendel)\
**Post date:** [July 24, 2021, 8:38pm UTC](https://forum.inductiveautomation.com/t/restart-gateway-from-vision-client/49166/5 "2021-07-24T20:38:57Z")

</div>

Alternatively, even from the Gateway web page would be acceptable.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [July 24, 2021, 9:20pm UTC](https://forum.inductiveautomation.com/t/restart-gateway-from-vision-client/49166/6 "2021-07-24T21:20:28Z")

</div>

> [@Rick.Schendel](#):
>
> 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.

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.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 24, 2021, 10:48pm UTC](https://forum.inductiveautomation.com/t/restart-gateway-from-vision-client/49166/7 "2021-07-24T22:48:54Z")

</div>

So, in this situation, I would recommend calling the [gwcmd tool](https://docs.inductiveautomation.com/display/DOC81/Gateway+Command-line+Utility+-+gwcmd) from a gateway message handler. The client would trigger this by calling system.util.sendMesssage() from a suitably secured button’s `actionPerformed` event.

---

<div class="post-metadata">

**Author:** ![ryanjmclaughlin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryanjmclaughlin/32/4318_2.png) [@ryanjmclaughlin](https://forum.inductiveautomation.com/u/ryanjmclaughlin)\
**Post date:** [July 26, 2021, 1:13am UTC](https://forum.inductiveautomation.com/t/restart-gateway-from-vision-client/49166/8 "2021-07-26T01:13:53Z")

</div>

Use EAM module. You can run a restart task from scripting. ([system.eam.runTask - Ignition User Manual 8.1 - Ignition Documentation](https://docs.inductiveautomation.com/display/DOC81/system.eam.runTask))

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [July 26, 2021, 2:45am UTC](https://forum.inductiveautomation.com/t/restart-gateway-from-vision-client/49166/9 "2021-07-26T02:45:51Z")

</div>

You will need to write the bash and the execute it with [system.util.execute - Ignition User Manual 8.0 - Ignition Documentation (inductiveautomation.com)](https://docs.inductiveautomation.com/display/DOC80/system.util.execute)
