summaryrefslogtreecommitdiff
path: root/athena-start
diff options
context:
space:
mode:
authorValaris <Valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-01-29 16:10:48 +0000
committerValaris <Valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-01-29 16:10:48 +0000
commit620e60eebce2c1f35c5c9a82f6ca365b316587f5 (patch)
tree38a39e0415f419d9a49ae456ed0e26654c23d559 /athena-start
parenta2675f07d7da22a7c6ae11f545bf8f671e785a82 (diff)
downloadhercules-620e60eebce2c1f35c5c9a82f6ca365b316587f5.tar.gz
hercules-620e60eebce2c1f35c5c9a82f6ca365b316587f5.tar.bz2
hercules-620e60eebce2c1f35c5c9a82f6ca365b316587f5.tar.xz
hercules-620e60eebce2c1f35c5c9a82f6ca365b316587f5.zip
AS OF SVN REV. 5901, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EVERYTHING ELSE GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5094 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'athena-start')
-rw-r--r--athena-start84
1 files changed, 84 insertions, 0 deletions
diff --git a/athena-start b/athena-start
new file mode 100644
index 000000000..f21dccf71
--- /dev/null
+++ b/athena-start
@@ -0,0 +1,84 @@
+#!/bin/sh
+# athena starting script by rowla
+
+PATH=./:$PATH
+
+L_SRV=login-server
+C_SRV=char-server
+M_SRV=map-server
+L_SRV_C=./conf/login_athena.conf
+C_SRV_C=./conf/char_athena.conf
+C_SRV_C2=./conf/inter_athena.conf
+M_SRV_C=./conf/map_athena.conf
+M_SRV_C2=./conf/battle_athena.conf
+M_SRV_C3=./conf/atcommand_athena.conf
+M_SRV_C4=./conf/script_athena.conf
+M_SRV_C5=./conf/msg_athena.conf
+M_SRV_C6=./conf/grf-files.txt
+
+print_start() {
+# more << EOF
+echo "Athena Starting..."
+echo " (c) 2003 Athena Project."
+echo " URL:http://project-yare.de/"
+echo ""
+echo "Debug informations will appear,"
+echo "since this is a test release."
+echo ""
+echo "checking..."
+#EOF
+}
+
+check_account() {
+ if [ ! -f ./save/account.txt ]; then
+ echo "0 s1 p1 - S 0" > save/account.txt
+ echo "1 s2 p2 - S 0" >>save/account.txt
+ echo "2 s3 p3 - S 0" >>save/account.txt
+ echo "3 s4 p4 - S 0" >>save/account.txt
+ echo "4 s5 p5 - S 0" >>save/account.txt
+ fi
+}
+
+check_files() {
+
+ for i in ${L_SRV} ${C_SRV} ${M_SRV} ${L_SRV_C} ${C_SRV_C} ${C_SRV_C2} ${M_SRV_C} ${M_SRV_C2} ${M_SRV_C3} ${M_SRV_C4} ${M_SRV_C5} ${M_SRV_C6}
+ do
+ if [ ! -f ./$i ]; then
+ echo "$i does not exist, or can't run."
+ echo "Stoped, Check your compile or configuration file."
+ exit 1;
+ fi
+ done
+
+# more << EOF
+echo "Check done."
+echo "Looks good, have a nice athena!"
+#EOF
+}
+
+
+case $1 in
+ 'start')
+ print_start
+ check_account
+ check_files
+
+ exec ./${L_SRV} ${L_SRV_C}&
+# exec ./${C_SRV} ${C_SRV_C} ${C_SRV_C2} > /dev/null&
+# exec ./${M_SRV} ${M_SRV_C} ${M_SRV_C2} > /dev/null&
+ exec ./${C_SRV} ${C_SRV_C} ${C_SRV_C2}&
+ exec ./${M_SRV} ${M_SRV_C} ${M_SRV_C2} ${M_SRV_C3} ${M_SRV_C4} ${M_SRV_C5} ${M_SRV_C6}&
+
+ echo "Now Started Athena."
+;;
+ 'stop')
+ ps ax | grep -E "${L_SRV}|${C_SRV}|${M_SRV}" | awk '{print $1}' | xargs kill -9
+ ;;
+ 'restart')
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "Usage: athena-start { start | stop | restart }"
+ ;;
+esac