Welcome to AC Web.
Results 1 to 3 of 3
  1. #1

    Question Restart script need help to make it work as .bat


    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    #!/bin/bash
    # Massive Network Game Object Server
    # autorestart Script

    while :
    do
    echo "MaNGOS daemon restarted"
    echo `date` >> crash.log &
    ./mangosd | tail -n 20 >> crash.log
    echo " " >> crash.log &
    pid=`ps ax | awk '($5 ~ /mangosd/) { print $1 }'`
    wait $pid
    echo `date` ", MaNGOS daemon crashed and restarted." >> serverlog
    done


    home come my bat file does not work?

  2. #2
    Quote Originally Posted by farbrorhumla View Post
    #!/bin/bash
    # Massive Network Game Object Server
    # autorestart Script

    while :
    do
    echo "MaNGOS daemon restarted"
    echo `date` >> crash.log &
    ./mangosd | tail -n 20 >> crash.log
    echo " " >> crash.log &
    pid=`ps ax | awk '($5 ~ /mangosd/) { print $1 }'`
    wait $pid
    echo `date` ", MaNGOS daemon crashed and restarted." >> serverlog
    done


    home come my bat file does not work?
    had the same issue 2 years ago , have you edited it with notepad++ on windows then uploaded to your linux host ?

    If that's what you've done then just do sudo chmod 777 path/to/RESTARTER_NAME.sh
    Last edited by darksoke; 04-16-2018 at 09:58 AM.

  3. #3

    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    Code:
    @ECHO OFF 
    CLS 
    ECHO Server Restart Started %time:~0,5% %date:~1% 
    :SERVERLOOP 
    worldserver.exe
    ECHO Server Restart %time:~0,5% %date:~1% 
    ECHO. 
    GOTO SERVERLOOP 
    :END
    Last edited by do0dles; 04-16-2018 at 04:15 PM.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •