i am using the code below and save it as auto-restarter.sh
then i put it to my /home/testro
then what will be the next step?
#!/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_sql & > /dev/null
fi
if [ $(ps | grep -e char-server | wc -l) -eq 0 ]; then
# Char server down
./char-server_sql & > /dev/null
fi
if [ $(ps | grep -e map-server | wc -l) -eq 0 ]; then
# Map server down
./map-server_sql & > /dev/null
fi
sleep 10
./auto-restarter.sh &
fi
Question
darking123
i am using the code below and save it as auto-restarter.sh
then i put it to my /home/testro
then what will be the next step?
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.