How do I remote close the server

Posted on
Fri Nov 23, 2018 3:35 pm
siclark offline
Posts: 863
Joined: Jun 13, 2017
Location: UK

How do I remote close the server

Sometimes my headless Mac mini gets in such a state that I can't remote connect. I can run the indigo client on my iMac and would like to be able to turn off the server from there so that I can free resources on the Mac mini and hopefully log in.
Is there a way?

Cheers

Posted on
Fri Nov 23, 2018 3:48 pm
kw123 offline
User avatar
Posts: 6353
Joined: May 12, 2013
Location: Dallas, TX

Re: How do I remote close the server

Remote access=
Ssh
Screen share
Teamviewer
?


Sent from my iPhone using Tapatalk

Posted on
Fri Nov 23, 2018 3:59 pm
siclark offline
Posts: 863
Joined: Jun 13, 2017
Location: UK

Re: How do I remote close the server

Remote access either VNC or team viewer. Using both on iPhone or iMac. Neither works.
Can still SSH but only really gives me option to do forced reboot. Would like to remote in and at least do a more graceful restart.

Posted on
Fri Nov 23, 2018 4:21 pm
kw123 offline
User avatar
Posts: 6353
Joined: May 12, 2013
Location: Dallas, TX

Re: How do I remote close the server

Does indigo client still work?

I had some cases where vnc did not work, but I indigo did.

Then I ssh to the server and do a sudo reboot now
You could do that to through an indigo action - You can pipe the password into the ssh command
Can send a a script later tonight that does that




Sent from my iPhone using Tapatalk

Posted on
Fri Nov 23, 2018 4:36 pm
siclark offline
Posts: 863
Joined: Jun 13, 2017
Location: UK

Re: How do I remote close the server

Yes indigo client still works, and the iOS app.

Yes I can ssh to the mac mini and do sudo reboot now, which is what I did this evening. And with postgres rather than sqlite that is normally ok, as it all restarts by itself, but would be nice to be able to do a more graceful shutdown.

I do have indigoserver setup as a Mac App with that plugin, and used to be able to turn it off, which led to indigo client immediately losing connection too, but that no longer works.

Was trying to avoid the ssh reboot route.

Posted on
Fri Nov 23, 2018 4:39 pm
lanbrown offline
Posts: 979
Joined: Sep 26, 2017

Re: How do I remote close the server

When you SSH in, why not view the processes and then you could kill Indigo.

ps -ef | grep Indigo

That will show you Indigo and all plugins.

For reference, the header is:
UID PID PPID C STIME TTY TIME CMD


When you have the process ID (PID), just enter:
kill -9 PID
So if the process id was 8918, the command would be:
kill -9 8918

macOS is technically BSD underneath, so use the CLI commands that come with it.

Posted on
Sun Nov 25, 2018 1:37 pm
jay (support) offline
Site Admin
User avatar
Posts: 15301
Joined: Mar 19, 2008
Location: Austin, Texas

Re: How do I remote close the server

If you're going to use the kill command, you might want to try a kill -15 first (that's a signal to the server to gracefully shut down and is the default if you don't specify a number). A kill -9 is basically a force quit which won't be a clean shutdown.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sun Nov 25, 2018 2:06 pm
siclark offline
Posts: 863
Joined: Jun 13, 2017
Location: UK

Re: How do I remote close the server

Cheers both. Yes,I do sometimes look for id of worst process and kill that but not clean.

Jay, when you say graceful shut down of server, you mean whole Mac? Is there a way to add a command on the remote indigo app to shut down remote server, rather than local one?

Posted on
Sun Nov 25, 2018 2:16 pm
lanbrown offline
Posts: 979
Joined: Sep 26, 2017

Re: How do I remote close the server

The kill command will not shutdown the Mac; it is only for processes. If you wanted to reboot the Mac; you would use the shutdown command from the CLI.

Posted on
Sun Nov 25, 2018 7:16 pm
kw123 offline
User avatar
Posts: 6353
Joined: May 12, 2013
Location: Dallas, TX

Re: How do I remote close the server

check : https://forums.indigodomo.com/viewtopic.php?f=164&t=21686 to do this in a standard indigo action.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 0 guests