Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
dirty reboot script - not working in cqc
#1
hoping for a linux guy to help here...

i need to bounce my xbmc clients (running custom linux - so limited services)

to reboot them from the cqc server i can run from the cli:
plink root@192.168.1.114 -pw openelec reboot

and I can put that in a button as:

System::ExecApp
P1=c:\\Program Files (x86)\\PuTTY\\plink.exe
P2=root@192.168.1.113 -pw openelec reboot
P3=c:\\Program Files (x86)\\PuTTY
P4=Show


this works the 1st time I execute it, but never again, i guess cqc is holding plink open, as it will just fail after executing the reboot...

do i have to find a cleaner way to send the reboot, or can i make cqc forget about the ExecApp ?


many thanks, Will




*** UPDATE ***

I can see the plink task in task manager, and if i kill it manually the button works again...

so i have added another ExecApp to kill plink

TASKKILL /F /IM plink.exe /T

nasty, but working
Reply
#2
Putty is usually pretty good about closing itself when a connection is terminated (sometimes too good). I wonder if you add an exit command after the reboot command if that will force it to close.
Wuench
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
Reply
#3
reboot closes the session from the server side, so exit won't work...

thanks for the thought...
Reply
#4
I know there is no "window". But looking through the putty options, under Session there is "Close Window On Exit", maybe change that to Always vs. "Only on Clean Exit", save the session under a session name and then use the -load option in plink to load that session (you can also put the command under the reboot command under the SSH settings of the session you save as well).
Wuench
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
Reply
#5
You could always try running it indirectly via a new session (via cmd.exe) and using the /c command to close after completion. But if the program itself is remaining open that wouldn't help either probably. If the program doesn't provide some means to tell it to shut down after termination, I'm not sure how you could get it to work other than killing it.
Dean Roddey
Explorans limites defectum
Reply
#6
the xbmc driver has a command to reboot the system. I know it works with openelec becasue I was testing it last night fixing up some driver naming issues in the interfaces after I changed the moniker.

Is OE crashing on you and you want to use some other method to reboot the system?

Sometimes its just easier to run a batch file than have CQC do it. you can have a little more control over what is happening and take CQC out of the equation. Good for testing as well as you just run the file manually.

Mick
Mykel Koblenz
Illawarra Smart Home
Reply
#7
I would bet XBMC is locking up. Eden locks up on me occasionally and has other issues like sound stops working, but I am on Windows 7. I setup something similar to kill XBMC from CQC through EventGhost.
Wuench
My Home Theater/Automation Website

[THREAD=5957]BlueGlass CQC Config[/THREAD]
[THREAD=10624]Wuench's CQC Drivers[/THREAD]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Windows 10 Reboot/Update Nag Screen gReatAutomation 7 5,168 03-31-2020, 04:48 PM
Last Post: LesAuber
  Home automation working without the cloud keepersg 1 1,817 03-30-2020, 06:32 AM
Last Post: gReatAutomation
  how to track what you're working on bbrendon 1 1,547 04-13-2016, 06:26 AM
Last Post: jkmonroe
  Need a little Java Script help sic0048 5 3,561 12-11-2009, 08:03 AM
Last Post: sic0048
  Blu-Ray Audio not working gacevich 12 4,674 12-01-2009, 08:33 PM
Last Post: IVB
  Essentia keypads not working - Did I miss a step? Sendero 1 1,686 01-28-2009, 07:05 PM
Last Post: Sendero
  Is anyone working on a driver for this? SomeWhatLost 8 3,292 01-23-2009, 05:07 PM
Last Post: beelzerob
  Ananiah RFID WORKING!!!! :-D jkmonroe 24 8,435 12-25-2006, 08:59 AM
Last Post: jkmonroe
  RDP Hack not working robashroy 2 2,030 11-20-2006, 03:35 PM
Last Post: robashroy

Forum Jump:


Users browsing this thread: 1 Guest(s)