Page 1 of 1

Remote shutdown and restart

Posted: Wed May 31, 2017 11:20 am
by tarmacalastair
Just a little tip to remotely reboot or shutdown your box for when it inevitably plays up and you need to restart it. This can be done from an Android phone using "HTTP Request Shortcuts" or similar so you don't need to find a PC/tablet.

Shutdown

Code: Select all

http://<VBox IP>/cgi-bin/ManageApp/ManageApp?OPTION=48&shutdown_action=Shutdown+System+
or, if you have a password set:

Code: Select all

http://user:password@<VBox IP>/cgi-bin/ManageApp/ManageApp?OPTION=48&shutdown_action=Shutdown+System+


Restart:

Code: Select all

http://<VBox IP>/cgi-bin/ManageApp/ManageApp?OPTION=48&restart_action=Restart+System+
(add user/pass if needed like above)

Could we have some help from Support please to restart services in this way? I've found that restarting the Streamer service in the past has brought my Vbox back to life much quicker than a reboot.

Re: Remote shutdown and restart

Posted: Sun Jun 25, 2017 1:04 pm
by admin@vbox
Sorry it took long time to reply - but here is the command to restart the Streamer

Code: Select all

http://<VBox IP>/cgi-bin/HttpControl/HttpControlApp?OPTION=1&Method=RestartStreamer

Re: Remote shutdown and restart

Posted: Sun Apr 22, 2018 12:43 pm
by nepo
hi

How I can use these http request with a terminal/console (Linux) or a bash script?
I want to use tvheadend with Post-processor command or bash script with cron !

Thanks and bye nepo!

@EdithBox
With the program curl, you can shutdown your vbox per terminal/script
Linux: curl 'http://192.168.0.63/cgi-bin/ManageApp/M ... n=Shutdown'
Windows @VBox Support Shutdown Remotely Can be done by this way:
There is also executable for Windows, that can be downloaded.

The usage is:
· Curl.exe
For example to shutdown the device with IP 192.168.0.63 an Windows:
· c:\tools\curl.exe 'http://192.168.0.63/cgi-bin/ManageApp/M ... n=Shutdown'

:!: Important: Use quote => curl 'xxxx'

Bye nepo!

Re: Remote shutdown and restart

Posted: Mon Nov 26, 2018 9:02 pm
by cubimol
:idea: Fantastic!, I created a script on my router to do a reboot of my VBox (after restarting the router itself to change IP). My problem was that VBox does not remember the username and password to access the network storage when it loses it because of the router restart.

Thank you all

Script for asuswrt in file /jffs/scripts/services-start executed at the start of the router

#!/bin/sh
sleep 3m
curl "http://<VBox IP>/cgi-bin/ManageApp/ManageApp?OPTION=48&restart_action=Restart+System+"

Re: Remote shutdown and restart

Posted: Thu Nov 29, 2018 4:48 am
by simpz
Yeah I find an overnight restart of vbox keeps it pretty stable.

Sadly I also had the credential for the network storage going. I ended up changing a samba config to allow an fully open (no credentials) from the vbox IP. May not be an option on a NAS I guess. But here are my smb.conf additions , I have a local vbox account for all his stuff:

Code: Select all

        
        ; Vbox needs in global section with newer samba
        ntlm auth = yes
        client ntlmv2 auth = yes
        guest account = vbox

[vboxg]
        path = /home/vbox
        writable = yes
        guest ok = yes
        create mask = 666
        force create mode = 666
        security mask = 666
        force security mode = 666
        directory mask = 0777
        force directory mode = 0777
        directory security mask = 0777
        force directory security mode = 0777
        hosts allow = 192.168.1.10