Programmatically restart server?

Posted on
Fri Mar 26, 2021 11:55 am
rhanson offline
Posts: 192
Joined: Apr 30, 2013

Programmatically restart server?

Looking for a way to programmatically restart the indigo server. Not the mac, but just the equivalent of doing a server shutdown and restart, but unattended.

When my network goes into WAN failover, all the existing network connections are severed. Most plugins get hung up on this. Even the reflector client gets snagged until it restarts itself. Some are able to gracefully re-connect, others endlessly complain about not being able to connect to things (even LAN hosts). Command line shows that everything is indeed accessible.

The most reliable solution is just to shut down the server process and restart it (via the indigo gui), which cleans everything out and reloads all plugins. How do we accomplish this via indigo script/api or macOS command line functions?

I tried just sending a sigterm, waiting a bit for it to gracefully shutdown (which is does nicely) and reload? But it complains that it can't find the client. What's the full command line to reload it so that it behaves like the client initiated it?

Posted on
Fri Mar 26, 2021 12:18 pm
FlyingDiver offline
User avatar
Posts: 7210
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Programmatically restart server?

Code: Select all
jkeenan@Kraken ~ % ls -l /usr/local/indigo
total 72
-rwxrwx---  1 root  admin  4534 Dec 22 18:02 indigo-clean-and-zip-plugin
-rwxrwx---  1 root  admin  5511 Dec 22 18:02 indigo-host
-rwxrwx---  1 root  admin  6269 Dec 22 18:02 indigo-restart-plugin
-rwxrwx---  1 root  admin  2484 Dec 22 18:02 indigo-start
-rwxrwx---  1 root  admin  5195 Dec 22 18:02 indigo-stop


I suspect a shell script that runs /usr/local/indigo/stop then /usr/local/indigo/start will work, but I haven't tested it.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Mar 27, 2021 1:02 pm
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: Programmatically restart server?

FlyingDiver wrote:
I suspect a shell script that runs /usr/local/indigo/stop then /usr/local/indigo/start will work, but I haven't tested it.

Yep, that should work.

Image

Posted on
Sat May 27, 2023 4:57 pm
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Programmatically restart server?

I just stumbled upon this old thread before creating a feature request for a "Restart Server" menu item.

Here's what mine looks like. Although it works from the command line, nothing happens when I execute it from an Action Group.

restart.png
restart.png (27.86 KiB) Viewed 869 times


UPDATE: Further reading this thread looks like this may not be possible

Posted on
Tue May 30, 2023 2:44 pm
glt offline
Posts: 11
Joined: Sep 01, 2013

Re: Programmatically restart server?

One option is to have a crontab entry check for a touch file. Action Group creates the touch file & external script removes it before performing the deactivation & activation.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests