Hello, i was trying fo lunch my rathena server and did what i have to do, compiled and etc, but when i try to put it online, i get this problems
First i have this directories
but then, when i ./athena-start start
i get this
(white = path)
here is my athena-start script
#!/bin/sh
#source var/function
. ./function.sh
inst_launch_workaround
PATH=./:$PATH
print_start() {
# more << EOF
echo "Athena Starting..."
echo " (c) 2013 rAthena Project"
echo ""
echo ""
echo "checking..."
#EOF
}
get_status(){
PIDFILE=.$1.pid
if [ -e ${PIDFILE} ]; then
ISRUN=$(ps ax | grep $(cat ${PIDFILE}) | grep $1)
PSRUN=$(echo "$ISRUN" | awk '{ print substr( $0, 0, 7) }')
fi
return $PSRUN
}
#cheking if already started, launch and mark in log
start_serv(){
LOGFILE="log/$1.log"
get_status $1
echo "My logfile=${LOGFILE}"
if [ -z ${PSRUN} ]; then
exec ./$1&
echo $! > .$1.pid
echo "Server '$1' started at `date +"%m-%d-%H:%M-%S"`"
echo "Server '$1' started at `date +"%m-%d-%H:%M-%S"`" >> ${LOGFILE}
else
echo "Can't start '$1', cause is already running p${PSRUN}"
echo "Can't start '$1', cause is already running p${PSRUN}" >> ${LOGFILE}
fi
}
#experimental
watch_serv(){
LOGFILE=./log/$1.log
ulimit -Sc unlimited
while true; do
get_status $1
if [ -z ${PSRUN} ]; then
$count=$count+1
echo "server '$1' is down" >> ${LOGFILE}
echo "restarting server at time at `date +"%m-%d-%H:%M-%S"`">> ${LOGFILE}
exec ./$1&
echo $! > .$1.pid
if [ $3 ] && [ $3 -lt $count ]; then break; fi
else sleep $2
fi
done
}
restart(){
$0 stop
for i in ${L_SRV} ${C_SRV} ${M_SRV}
do
while true; do
get_status ${i}
if [ ${PSRUN} ]; then echo "'${i}' is still running p${PSRUN} waiting end"; sleep 2;
else break; fi
done
done
$0 start
}
case $1 in
'start')
print_start
check_files
echo "Check complete."
echo "Looks good, a nice Athena!"
for i in ${L_SRV} ${C_SRV} ${M_SRV}
do
start_serv $i
done
echo "Now Started Athena."
;;
'watch')
for i in ${L_SRV} ${C_SRV} ${M_SRV}
do
watch_serv $i 10 3
done
echo "Now watching Athena."
;;
'stop')
for i in ${L_SRV} ${C_SRV} ${M_SRV}
do
PIDFILE=.${i}.pid
if [ -e .{PIDFILE} ]; then
kill $(cat ${PIDFILE})
rm ${PIDFILE}
fi
done
;;
'restart')
restart
;;
'status')
for i in ${L_SRV} ${C_SRV} ${M_SRV}
do
get_status ${i}
if [ ${PSRUN} ]; then echo "'${i}' is running p${PSRUN}"; else echo "'${i}' seem down"; fi
done
;;
*)
echo "Usage: athena-start { start | stop | restart | status | watch }"
read -p "Enter a valid option: " readEnterKey
$0 $readEnterKey
;;
esac
i hope im giving enought information
the files are in the correct directory, i have checked it twice and they are in the correct path
my players are waiting and i don't have much time, my laptop is about to turn off because it's battery life is about to die (it is already connected)
please help ! if this need more information i will show it!
Question
Kido
Hello, i was trying fo lunch my rathena server and did what i have to do, compiled and etc, but when i try to put it online, i get this problems
First i have this directories
but then, when i ./athena-start start
i get this
(white = path)
here is my athena-start script
i hope im giving enought information
the files are in the correct directory, i have checked it twice and they are in the correct path
my players are waiting and i don't have much time, my laptop is about to turn off because it's battery life is about to die (it is already connected)
please help ! if this need more information i will show it!
sorry for my bad english
help ;-;
Edited by KidoLink to comment
Share on other sites
17 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.