Would you like to react to this message? Create an account in a few clicks or log in to continue.

Official Community Forums
 
HomeHome  SearchSearch  Latest imagesLatest images  RegisterRegister  Log in  The Wiki  Website  github Project  

 

 stop-multiverse.bat

Go down 
AuthorMessage
Xangis
Foundation Developer
Xangis


Posts : 124
Join date : 2011-12-30
Location : Beaverton, OR

stop-multiverse.bat Empty
PostSubject: stop-multiverse.bat   stop-multiverse.bat EmptyFri 27 Apr - 19:24

I'm running Windows 7 (Home Premium x64) and stop-multiverse.bat doesn't work because tskill doesn't exist. Taskkill does, and it does the trick with slightly different syntax (taskkill /PID %pid% /F). Here's how I modified the file to work for stopping services on Win7:

Code:
@echo off

:: Check that script is being run from mv_home\bin
if not defined MV_HOME (
  echo MV_HOME is not defined, using relative paths
  if exist .\start-multiverse.bat (
    set MV_HOME=..
  ) else (
    echo Batch script must be run from MV_HOME\bin directory!
    exit
  )
)

if exist run\%MV_WORLDNAME%\combat.bat (
  call run\%MV_WORLDNAME%\combat.bat
)
echo Stopping combat server process ID %pid%
taskkill /PID %pid% /F

if exist run\%MV_WORLDNAME%\instance.bat (
 call run\%MV_WORLDNAME%\instance.bat
)
echo Stopping instance server process ID %pid%
taskkill /PID %pid% /F

if exist run\%MV_WORLDNAME%\login_manager.bat (
  call run\%MV_WORLDNAME%\login_manager.bat
)
echo Stopping login mangaer server process ID %pid%
taskkill /PID %pid% /F

if exist run\%MV_WORLDNAME%\mobserver.bat (
  call run\%MV_WORLDNAME%\mobserver.bat
)
echo Stopping mob server process ID %pid%
taskkill /PID %pid% /F

if exist run\%MV_WORLDNAME%\objmgr.bat (
  call run\%MV_WORLDNAME%\objmgr.bat
)
echo Stopping object manager server process ID %pid%
taskkill /PID %pid% /F

if exist run\%MV_WORLDNAME%\proxy_1.bat (
  call run\%MV_WORLDNAME%\proxy_1.bat
)
echo Stopping proxy server process ID %pid%
taskkill /PID %pid% /F

if exist run\%MV_WORLDNAME%\startup.bat (
  call run\%MV_WORLDNAME%\startup.bat
)
echo Stopping startup monitor server process ID %pid%
taskkill /PID %pid% /F

if exist run\%MV_WORLDNAME%\voiceserver.bat (
  call run\%MV_WORLDNAME%\voiceserver.bat
)
echo Stopping voice server process ID %pid%
taskkill /PID %pid% /F

if exist run\%MV_WORLDNAME%\wmgr_1.bat (
  call run\%MV_WORLDNAME%\wmgr_1.bat
)
echo Stopping world manager server process ID %pid%
taskkill /PID %pid% /F



if exist run\%MV_WORLDNAME%\combat.bat (
  call run\%MV_WORLDNAME%\domain.bat
)
echo Stopping message domain server process ID %pid%
taskkill /PID %pid% /F

:exit

I tried this on my Windows XP Pro machine and it worked because that box has both taskkill and tskill commands. I don't know what non-pro has or what Vista has, but taskkill might be supported on more systems. Feel free to use or not use my modifications as you see fit. Smile
Back to top Go down
http://zetacentauri.com
 
stop-multiverse.bat
Back to top 
Page 1 of 1
 Similar topics
-
» Stop-multiverse...unknown command (Vista)
» Official Closure of Multiverse Inc., and plans for The Multiverse Foundation
» Welcome to Multiverse
» Hello again Multiverse :)
» New to multiverse

Permissions in this forum:You cannot reply to topics in this forum
 :: Development :: Server Scripting and Development-
Jump to: