summaryrefslogtreecommitdiff
path: root/tools/mapchecker.sh
diff options
context:
space:
mode:
authorbrianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-07-27 16:56:26 +0000
committerbrianluau <brianluau@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-07-27 16:56:26 +0000
commita269c22b8d92b56a6b09bc2fa8375d1803cab909 (patch)
tree758a3a283bbfe847cdfde9cd3416f55270fb6844 /tools/mapchecker.sh
parentfc079afd18a8189b8542bc4ec989dc4f123e30a7 (diff)
downloadhercules-a269c22b8d92b56a6b09bc2fa8375d1803cab909.tar.gz
hercules-a269c22b8d92b56a6b09bc2fa8375d1803cab909.tar.bz2
hercules-a269c22b8d92b56a6b09bc2fa8375d1803cab909.tar.xz
hercules-a269c22b8d92b56a6b09bc2fa8375d1803cab909.zip
- Added svn:eol-style native for some conf/css/html/pl/sql/txt files.
- Added svn:executable property for several batch/shell scripts. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13972 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'tools/mapchecker.sh')
-rwxr-xr-x[-rw-r--r--]tools/mapchecker.sh112
1 files changed, 56 insertions, 56 deletions
diff --git a/tools/mapchecker.sh b/tools/mapchecker.sh
index 5f26c9d4b..7250c342e 100644..100755
--- a/tools/mapchecker.sh
+++ b/tools/mapchecker.sh
@@ -1,56 +1,56 @@
-#!/bin/bash
-
-athena_dir="/home/athena/658/"
-
-while [ true ] ; do
-
-if [ ` ps fauxw | grep map-server | grep -v grep | wc -l ` -eq 0 ];then
- #echo `date` " -- map-server crashed - restarting"
- echo `date` " -- map-server crashed - restarting" >> /var/log/athena_status.log
- killall -9 map-server
- cd $athena_dir
- nohup ./map-server ./conf/map_athena.conf ./inter_athena.conf &
- sleep 240
- #sleep 40 #for fast pc's remove the "#" at the beginning of the line and delete the line above
-fi
-
-
-if [ ` ps fauxw | grep map-server | grep -v grep | awk '{print $3}' | awk 'BEGIN{FS="."} {print $1}' ` -gt 10 ];then
- #echo `date` " -- mapserver cpuload over 10 - restarting"
- echo `date` " -- mapserver cpuload over 10 - restarting" >> /var/log/athena_status.log
- killall -9 map-server
- cd $athena_dir
- nohup ./map-server ./conf/map_athena.conf ./inter_athena.conf &
- sleep 240
- #sleep 40 #for fast pc's remove the "#" at the beginning of the line and delete the line above
- #echo `date` " -- restarted"
- echo `date` " -- restarted" >> /var/log/athena_status.log
-fi
-
-if [ ` ps fauxw | grep char-server | grep -v grep | wc -l ` -eq 0 ];then
- #echo `date` " -- char server crashed - restarting"
- echo `date` " -- char server crashed - restarting" >> /var/log/athena_status.log
- killall -9 char-server
- cd $athena_dir
- nohup ./char-server ./conf/char_athena.conf ./conf/inter_athena.conf &
- #echo `date` " -- restarted"
- echo `date` " -- restarted" >> /var/log/athena_status.log
-
-fi
-
-if [ ` ps fauxw | grep login-server | grep -v grep | wc -l ` -eq 0 ];then
- #echo `date` " -- login server crashed - restarting"
- echo `date` " -- login server crashed - restarting" >> /var/log/athena_status.log
- killall -9 login-server
- cd $athena_dir
- nohup ./login-server ./conf/login_athena.conf &
- #echo `date` " -- restarted"
- echo `date` " -- restarted" >> /var/log/athena_status.log
-
-fi
-
-
-#echo `date` " -- everything is fine"
-echo `date` " -- everything is fine" >> /var/log/athena_status.log
-sleep 30
-done
+#!/bin/bash
+
+athena_dir="/home/athena/658/"
+
+while [ true ] ; do
+
+if [ ` ps fauxw | grep map-server | grep -v grep | wc -l ` -eq 0 ];then
+ #echo `date` " -- map-server crashed - restarting"
+ echo `date` " -- map-server crashed - restarting" >> /var/log/athena_status.log
+ killall -9 map-server
+ cd $athena_dir
+ nohup ./map-server ./conf/map_athena.conf ./inter_athena.conf &
+ sleep 240
+ #sleep 40 #for fast pc's remove the "#" at the beginning of the line and delete the line above
+fi
+
+
+if [ ` ps fauxw | grep map-server | grep -v grep | awk '{print $3}' | awk 'BEGIN{FS="."} {print $1}' ` -gt 10 ];then
+ #echo `date` " -- mapserver cpuload over 10 - restarting"
+ echo `date` " -- mapserver cpuload over 10 - restarting" >> /var/log/athena_status.log
+ killall -9 map-server
+ cd $athena_dir
+ nohup ./map-server ./conf/map_athena.conf ./inter_athena.conf &
+ sleep 240
+ #sleep 40 #for fast pc's remove the "#" at the beginning of the line and delete the line above
+ #echo `date` " -- restarted"
+ echo `date` " -- restarted" >> /var/log/athena_status.log
+fi
+
+if [ ` ps fauxw | grep char-server | grep -v grep | wc -l ` -eq 0 ];then
+ #echo `date` " -- char server crashed - restarting"
+ echo `date` " -- char server crashed - restarting" >> /var/log/athena_status.log
+ killall -9 char-server
+ cd $athena_dir
+ nohup ./char-server ./conf/char_athena.conf ./conf/inter_athena.conf &
+ #echo `date` " -- restarted"
+ echo `date` " -- restarted" >> /var/log/athena_status.log
+
+fi
+
+if [ ` ps fauxw | grep login-server | grep -v grep | wc -l ` -eq 0 ];then
+ #echo `date` " -- login server crashed - restarting"
+ echo `date` " -- login server crashed - restarting" >> /var/log/athena_status.log
+ killall -9 login-server
+ cd $athena_dir
+ nohup ./login-server ./conf/login_athena.conf &
+ #echo `date` " -- restarted"
+ echo `date` " -- restarted" >> /var/log/athena_status.log
+
+fi
+
+
+#echo `date` " -- everything is fine"
+echo `date` " -- everything is fine" >> /var/log/athena_status.log
+sleep 30
+done