.
This commit is contained in:
27
baseReboot.bat
Normal file
27
baseReboot.bat
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
@echo off
|
||||||
|
call C:\Scripts\wBase\baseENV.bat
|
||||||
|
@REM xxxxxxx
|
||||||
|
echo "%~n0: Start"
|
||||||
|
|
||||||
|
set STOPFILE=C:\Scripts\STOP
|
||||||
|
set SHUTDOWN=1
|
||||||
|
|
||||||
|
@REM if "%check_computername%" EQU "SERVER" (
|
||||||
|
@REM set SHUTDOWN=0
|
||||||
|
@REM mkdir %STOPFILE%
|
||||||
|
@REM )
|
||||||
|
|
||||||
|
if exist %STOPFILE% (
|
||||||
|
echo "Reboot being overriden"
|
||||||
|
call %TMESSAGE% '"%check_computername% reboot overriden"'
|
||||||
|
set SHUTDOWN=0
|
||||||
|
)
|
||||||
|
|
||||||
|
if [%SHUTDOWN%] == [0] (
|
||||||
|
echo "Not shutting down"
|
||||||
|
) else (
|
||||||
|
echo "shutting down"
|
||||||
|
call %TMESSAGE% '"%check_computername% rebooting"'
|
||||||
|
C:\Windows\System32\shutdown.exe /r /t 30
|
||||||
|
)
|
||||||
|
|
||||||
Reference in New Issue
Block a user