rathena/athena-start
ultramage e5b0ee65bf Removed the 'create athena.txt' step from athena-start as the server does that automatically.
Removed the 'kill -9' action from athena-start, as it prevents the server from shutting down cleanly. If your process gets stuck, kill it manually (or add a hard-stop option).
Fixed one wrong revision number in changelog.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11924 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-17 07:09:10 +00:00

64 lines
1.1 KiB
Bash

#!/bin/sh
# athena starting script by rowla
# modified by shazeya@syafi.com (NL101541)
PATH=./:$PATH
L_SRV=login-server_sql
C_SRV=char-server_sql
M_SRV=map-server_sql
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}&
exec ./${C_SRV}&
exec ./${M_SRV}&
echo "Now Started Athena."
;;
'stop')
ps ax | grep -E "${L_SRV}|${C_SRV}|${M_SRV}" | awk '{print $1}' | xargs kill
;;
'restart')
$0 stop
$0 start
;;
*)
echo "Usage: athena-start { start | stop | restart }"
;;
esac