summaryrefslogtreecommitdiff
path: root/src/tool/mapcheck.sh
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-22 22:00:56 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-22 22:00:56 +0000
commit64aaa63d9086ccc5ab181cc0ea2e697e9b61a6cb (patch)
tree4f3880747d0087b719b91f2c0ea91d40a14792a4 /src/tool/mapcheck.sh
parent7b1a03e77740ebcdf6d646fd7f3b94f92ec01da8 (diff)
downloadhercules-64aaa63d9086ccc5ab181cc0ea2e697e9b61a6cb.tar.gz
hercules-64aaa63d9086ccc5ab181cc0ea2e697e9b61a6cb.tar.bz2
hercules-64aaa63d9086ccc5ab181cc0ea2e697e9b61a6cb.tar.xz
hercules-64aaa63d9086ccc5ab181cc0ea2e697e9b61a6cb.zip
Updated the eol style
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1271 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/tool/mapcheck.sh')
-rw-r--r--src/tool/mapcheck.sh66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/tool/mapcheck.sh b/src/tool/mapcheck.sh
index 54cdd0765..337884c43 100644
--- a/src/tool/mapcheck.sh
+++ b/src/tool/mapcheck.sh
@@ -1,34 +1,34 @@
-#!/bin/sh
-echo "============================================"
-echo "= map server status checker... ="
-echo "============================================"
-./map-server.exe &
-sleep 40
-
-while [ 0 ]
-do
- pcpu=` top -n 1| grep map-server | awk '{print $9}' | awk 'BEGIN{FS="."} {print $1}' `
- if [ "$pcpu" -gt 80 ];then
- echo "============================================"
- echo "map server is more than 80% (now $pcpu%)"
- echo "============================================"
- ppid=` ps -a | grep map-server | awk '{print $1}' `
- kill $ppid
- ./map-server.exe &
- sleep 40
- else
- pmapct=` ps -a| grep map-server | wc -l `
- if [ "$pmapct" -eq 0 ];then
- echo "============================================"
- echo "map server is not running..."
- echo "restart map server..."
- echo "============================================"
- ./map-server.exe &
- sleep 40
- #echo "test"
- else
- echo "map server is ok (now $pcpu%)..."
- sleep 5
- fi
- fi
+#!/bin/sh
+echo "============================================"
+echo "= map server status checker... ="
+echo "============================================"
+./map-server.exe &
+sleep 40
+
+while [ 0 ]
+do
+ pcpu=` top -n 1| grep map-server | awk '{print $9}' | awk 'BEGIN{FS="."} {print $1}' `
+ if [ "$pcpu" -gt 80 ];then
+ echo "============================================"
+ echo "map server is more than 80% (now $pcpu%)"
+ echo "============================================"
+ ppid=` ps -a | grep map-server | awk '{print $1}' `
+ kill $ppid
+ ./map-server.exe &
+ sleep 40
+ else
+ pmapct=` ps -a| grep map-server | wc -l `
+ if [ "$pmapct" -eq 0 ];then
+ echo "============================================"
+ echo "map server is not running..."
+ echo "restart map server..."
+ echo "============================================"
+ ./map-server.exe &
+ sleep 40
+ #echo "test"
+ else
+ echo "map server is ok (now $pcpu%)..."
+ sleep 5
+ fi
+ fi
done \ No newline at end of file