summaryrefslogtreecommitdiff
path: root/eathena.sh
diff options
context:
space:
mode:
authorDennis Friis <peavey@placid.dk>2008-04-02 15:09:18 +0000
committerDennis Friis <peavey@placid.dk>2008-04-02 15:09:18 +0000
commit97bb21a79949779df76269b087f3bce7ef8179ee (patch)
tree08b3bdee2f3596581dd8d8f051afd37ee648cee7 /eathena.sh
parentdafdbbe9f1db3e6943003a79a6e23c00da2f2fe1 (diff)
downloadtmwa-97bb21a79949779df76269b087f3bce7ef8179ee.tar.gz
tmwa-97bb21a79949779df76269b087f3bce7ef8179ee.tar.bz2
tmwa-97bb21a79949779df76269b087f3bce7ef8179ee.tar.xz
tmwa-97bb21a79949779df76269b087f3bce7ef8179ee.zip
initial checkin
Diffstat (limited to 'eathena.sh')
-rwxr-xr-xeathena.sh52
1 files changed, 52 insertions, 0 deletions
diff --git a/eathena.sh b/eathena.sh
new file mode 100755
index 0000000..edfabf9
--- /dev/null
+++ b/eathena.sh
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+# $Id: eathena.sh,v 1.5 2006/03/10 21:41:09 Platyna Exp $
+#----------------------------------------------------------------------
+# Description: Simple script to control eAthena locally.
+# Author: Zuzanna K. Filutowska <platyna@platinum.linux.pl>
+# Created at: Fri Feb 17 18:23:56 CET 2006
+# License: GPL
+# Copyright (c) 2006 Zuzanna K. Filutowska All rights reserved.
+#
+#----------------------------------------------------------------------
+# Configure section:
+PATH=$PATH:.
+SRVHOMEDIR=$HOME/tmwserver
+#----------------------------------------------------------------------
+# main()
+
+cd ${SRVHOMEDIR}
+
+eathena_start() {
+ if [ -x ${SRVHOMEDIR}/eathena-monitor ];
+ then echo "Starting eathena monitor..."
+ ${SRVHOMEDIR}/eathena-monitor
+ else echo "Eathena monitor binary is not executable or not found."
+ fi
+}
+
+eathena_stop() {
+ echo "Shutting down eathena monitor..."
+ killall eathena-monitor
+}
+
+eathena_restart() {
+ eathena_stop
+ echo "Waiting for all eathena processes to end..."
+ sleep 1
+ eathena_start
+}
+
+case "$1" in
+'start')
+ eathena_start
+ ;;
+'stop')
+ eathena_stop
+ ;;
+'restart')
+ eathena_restart
+ ;;
+*)
+ echo "usage $0 start|stop|restart"
+esac