summaryrefslogtreecommitdiff
path: root/athena-start
diff options
context:
space:
mode:
authorglighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-24 08:50:59 +0000
committerglighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-24 08:50:59 +0000
commit913fd65ef9a5fa55ebbd5ac4502f72895879fc84 (patch)
tree0241f5c639284276a216f86a964c8ff64bb0532b /athena-start
parenteef34512a2f465f7b2b5453fadfcc0e61c097e01 (diff)
downloadhercules-913fd65ef9a5fa55ebbd5ac4502f72895879fc84.tar.gz
hercules-913fd65ef9a5fa55ebbd5ac4502f72895879fc84.tar.bz2
hercules-913fd65ef9a5fa55ebbd5ac4502f72895879fc84.tar.xz
hercules-913fd65ef9a5fa55ebbd5ac4502f72895879fc84.zip
-Fix bugreport:6751 allow noseige to be casted while under status.
-Upd athena-start, save pid to not kill all other process with same name (annoying when multiple server) -Harmonize setmapflag and @mapflag, flag value is always an int, and could be superior to 1 for some mapflag -Fix bugreport:6923 for Windows -Upd @zeny to remove rest of zeny if not enough money as requested git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16959 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'athena-start')
-rwxr-xr-xathena-start13
1 files changed, 11 insertions, 2 deletions
diff --git a/athena-start b/athena-start
index ab5ac3de0..2b9fcc38e 100755
--- a/athena-start
+++ b/athena-start
@@ -37,7 +37,7 @@ echo "Check complete."
echo "Looks good, a nice Athena!"
#EOF
}
-
+
case $1 in
'start')
@@ -45,13 +45,22 @@ case $1 in
check_files
exec ./${L_SRV}&
+ echo $! > .${L_SRV}.pid
exec ./${C_SRV}&
+ echo $! > .${C_SRV}.pid
exec ./${M_SRV}&
+ echo $! > .${M_SRV}.pid
echo "Now Started Athena."
;;
'stop')
- ps ax | grep -E "${L_SRV}|${C_SRV}|${M_SRV}" | awk '{print $1}' | xargs kill
+ 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