Jump to content
The forums will be going offline for an extended maintenance period at 1400hrs GMT on 19th June 2025. The number of hours for this downtime is intentionally not advertised due to the nature of these upgrades. ×
  • 0

Auto-Restart Service Crash


Psyz

Question


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   1
  • Joined:  09/28/12
  • Last Seen:  

Can anyone introduce a guide on how to configure the shell to start again some of the services of rathena after a crash?
Using Crontab or another system?
I am grateful.

PS: If possible inside the screen

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  485
  • Reputation:   271
  • Joined:  06/13/17
  • Last Seen:  

#!/bin/bash
run=1
if [ "$run" -eq 1 ]; then
if [ $(ps | grep -e login-server | wc -l) -eq 0 ]; then
# Login server down
./login-server & > /dev/null
fi
if [ $(ps | grep -e char-server | wc -l) -eq 0 ]; then
# Char server down
./char-server & > /dev/null
fi
if [ $(ps | grep -e map-server | wc -l) -eq 0 ]; then
# Map server down
./map-server & > /dev/null
fi
sleep 10
./auto-restarter.sh &
fi

you can also cut each server in run it on screen.

  • MVP 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  23
  • Reputation:   1
  • Joined:  09/28/12
  • Last Seen:  

4 hours ago, Haruka Mayumi said:

#!/bin/bash
run=1
if [ "$run" -eq 1 ]; then
if [ $(ps | grep -e login-server | wc -l) -eq 0 ]; then
# Login server down
./login-server & > /dev/null
fi
if [ $(ps | grep -e char-server | wc -l) -eq 0 ]; then
# Char server down
./char-server & > /dev/null
fi
if [ $(ps | grep -e map-server | wc -l) -eq 0 ]; then
# Map server down
./map-server & > /dev/null
fi
sleep 10
./auto-restarter.sh &
fi

you can also cut each server in run it on screen.

Perfect !

Thk !!!

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.02
  • Content Count:  189
  • Reputation:   7
  • Joined:  10/22/18
  • Last Seen:  

On 3/19/2021 at 10:48 PM, Haruka Mayumi said:
#!/bin/bash
run=1
if [ "$run" -eq 1 ]; then
if [ $(ps | grep -e login-server | wc -l) -eq 0 ]; then
# Login server down
./login-server & > /dev/null
fi
if [ $(ps | grep -e char-server | wc -l) -eq 0 ]; then
# Char server down
./char-server & > /dev/null
fi
if [ $(ps | grep -e map-server | wc -l) -eq 0 ]; then
# Map server down
./map-server & > /dev/null
fi
sleep 10
./auto-restarter.sh &
fi

you can also cut each server in run it on screen.

Hi, may i know how to use/run this script?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...