summaryrefslogtreecommitdiff
path: root/debug-start
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-09 11:00:49 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-09 11:00:49 -0300
commit8a4bf716002a017de77fe7df301ef8e4aaf00a2e (patch)
tree4947d0b015baad639fa07133369e9a09c8a468bc /debug-start
downloadserverdata-8a4bf716002a017de77fe7df301ef8e4aaf00a2e.tar.gz
serverdata-8a4bf716002a017de77fe7df301ef8e4aaf00a2e.tar.bz2
serverdata-8a4bf716002a017de77fe7df301ef8e4aaf00a2e.tar.xz
serverdata-8a4bf716002a017de77fe7df301ef8e4aaf00a2e.zip
Initial commit
Diffstat (limited to 'debug-start')
-rwxr-xr-xdebug-start72
1 files changed, 72 insertions, 0 deletions
diff --git a/debug-start b/debug-start
new file mode 100755
index 00000000..5438cb0f
--- /dev/null
+++ b/debug-start
@@ -0,0 +1,72 @@
+#!/bin/sh
+# athena starting script by rowla
+# modified by shazeya@syafi.com (NL101541)
+
+PATH=./:$PATH
+
+L_SRV=login-server
+C_SRV=char-server
+M_SRV=map-server
+
+print_start() {
+# more << EOF
+echo "Athena Starting..."
+echo " (c) 2003 Athena Project"
+echo " modified by shazeya@syafi.com"
+echo ""
+#echo "Debug informations will appear,"
+#echo "since this is a test release."
+#echo ""
+echo "checking..."
+#EOF
+}
+
+check_files() {
+
+ for i in ${L_SRV} ${C_SRV} ${M_SRV}
+ do
+ if [ ! -f ./$i ]; then
+ echo "$i does not exist, or can't run."
+ echo "Stop. Check your compile."
+ exit 1;
+ fi
+ done
+
+# more << EOF
+echo "Check complete."
+echo "Looks good, a nice Athena!"
+#EOF
+}
+
+
+case $1 in
+ 'start')
+ print_start
+ check_files
+
+ exec ./${L_SRV} 2>${L_SRV}.log &
+ echo $! > .${L_SRV}.pid
+ exec ./${C_SRV} 2>${C_SRV}.log &
+ echo $! > .${C_SRV}.pid
+ exec ./${M_SRV} 2>${M_SRV}.log &
+ echo $! > .${M_SRV}.pid
+
+ echo "Now Started Athena."
+;;
+ 'stop')
+ for i in .${L_SRV}.pid .${C_SRV}.pid .${M_SRV}.pid
+ do
+ if [ -e ./$i ]; then
+ kill $(cat $i)
+ rm $i
+ fi
+ done
+;;
+ 'restart')
+ $0 stop
+ $0 start
+;;
+ *)
+ echo "Usage: athena-start { start | stop | restart }"
+;;
+esac