How to Server Reboot

When I install a server update from a Windows computer other than the actual server, it asks if it can reboot the server, and I say yes.

How can I reboot the server if I am not doing an update?

Ken

What kind of device are you running the server on?

I just go into the DVR ui in my phone's browser and longpress the upgrade button.

The server is running on Windows 10.

Are you trying to reboot the server when no one is watching or recording ?

From a command/Powershell prompt, you can try (assuming you installed the DVR server as a service):

  • net stop … && net start …
  • sc stop … && sc start …
  • Restart-Service …

This is what I use to check if dvr is recording being watched or running comskip. It will check every 5 minutes for DVR usage if it finds no usage it will reboot... You can use any commands you want.

rebootserver.bat

goto startnow
:loop
timeout 300
:startnow

CD /d "%~dp0"

del "%~dp0dvr"
wget.exe "http://127.0.0.1:8089/dvr"
findstr  /I /C:"Recording" "%~dp0dvr"
set inuse=%ERRORLEVEL%
if %inuse% EQU 0 goto loop
findstr  /I /C:"Processing" "%~dp0dvr"
set inuse=%ERRORLEVEL%
if %inuse% EQU 0 goto loop
findstr  /I /C:"Watching" "%~dp0dvr"
set inuse=%ERRORLEVEL%
if %inuse% EQU 0 goto loop

Rem *** Enter Commands below ********************************
shutdown -r -t 2
exit

Yes, exactly.

Well then the batch job I posted will work you just need WGET.

I'm trying to reboot from a different computer than the one where the server is running. I may be hundreds of miles away.

Then ensure that SSH is running on the same machine that runs your DVR server, and login via SSH. You can then execute the commands from the prompt there, or start a Powershell session from the command prompt.

Otherwise, if you can't use a command line, use RDP or VNC.

For windows machine remote control I highly recommend TeamViewer. It’s also free for personal use. You install and configure it on the machine and you’ll be able to connect remotely from anywhere in the world as long as you have internet access.

1 Like

TeamViewer can shove it up their circuit boards. screw you over by saying you are using it for commercial use detected each time i was remoting into my Grandparent computer to fix things every day . forget them. also they have have been hacked before.

Use DWS instead now. so much better. Open Source. and can make easy one click url links to computers with varying permissions and functions. Super light weight for resources.
https://www.dwservice.net/en/home.html

2 Likes

That Service is great ... much easier ...

Thanks for the info.

1 Like

Having the ability to reboot the server and / or the HDHomerun without spending several hours brushing up on my programming skills would be cool. An option in the ui to reboot one or both at a specified time.

2 Likes