Eathena Debian Openvz Compile
How to Compile Eathena On Openvz Container
#apt-get install build-essential zlib1g-dev mysql-server libmysqlclient15-dev php5 apache2 phpmyadmin php5-mysql
Cd to your eathena folder and extract em all
#./configure --with-MYSQL_LIBS=/usr/lib/libmysqlclient.so
#make sql
Make Luncher : Credit EA Bord User Jabber
#nano Ealuncher
#!/bin/bash
- eAthena generic server starter v1.0, by Kant
- author contact info:
- e-mail / jabber: [email protected]
- msn messenger: [email protected]
- note: the original filename of this script is "srv"
- Usage:
- /.srv A B
- A is the server you want to start (login, char or map)
- B is the type (sql or txt). if none given, txt will be chosen.(see comments
- below for details on this)
- Which server to start?
case $1 in login ) srv=$1;; char ) srv=$1;; map ) srv=$1;;
- ) echo wrong server
exit;;
esac
- SQL or TXT?
- this check is done because the eA makefile spits the "_sql" at the end of
- binaries when it compiles for sql usage.
case $2 in sql ) type="_sql";; txt ) type="";;
- ) type="";;
esac
- Check if selected server exists. If not, exit with message
test -e ${srv}-server${type} case $? in 1 ) echo server does not exist!
exit;;
esac
- Check if selected is executable. If not, exit with message
test -x ${srv}-server${type} case $? in 1 ) echo server is not executable!
exit;;
esac
- Test a control file. 1 means the server starts, 0 means the server doesnt
- start. if there is no file, the scripts ignore the check.
test -e start.txt case $? in 0 ) case $(cat start.txt) in
0 ) echo server deactivated, look in start.txt exit;; esac;;
esac
- server restart loop
while true do
- Notify server start
echo \[`date +"%Y-%m-%d--%H:%M:%S"`\] starting ${1}-server... | tee -a logs/${1}-server.txt
- start server acording to parameters
./${srv}-server${type} exit=$?
- depending on exit code, stop the loop or restart
case $exit in
- there is something wring in the configuration, do not restart
1 ) echo \[`date +"%Y-%m-%d--%H:%M:%S"`\] ${1}-server config is wrong | tee -a logs/${1}-server.txt
exit;;
- the server was killed by the user, restart
0 ) echo \[`date +"%Y-%m-%d--%H:%M:%S"`\] ${1}-server killed by user | tee -a logs/${1}-server.txt
sleep 5;;
- there was a crash because of a bug, restart
- exit code 127 means server crash
- ) echo \[`date +"%Y-%m-%d--%H:%M:%S"`\] !!! ${1}-server down, exit code is $exit | tee -a logs/${1}-server.txt
sleep 5;;
esac
done
#chmod +x Ealuncher
Finish Compile