|
@@ -1,5 +1,20 @@
|
|
|
#!/bin/bash
|
|
|
-## Copyright © 2011 HPCC Systems. All rights reserved.
|
|
|
+################################################################################
|
|
|
+# Copyright (C) 2011 HPCC Systems.
|
|
|
+#
|
|
|
+# All rights reserved. This program is free software: you can redistribute it and/or modify
|
|
|
+# it under the terms of the GNU Affero General Public License as
|
|
|
+# published by the Free Software Foundation, either version 3 of the
|
|
|
+# License, or (at your option) any later version.
|
|
|
+#
|
|
|
+# This program is distributed in the hope that it will be useful,
|
|
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
+# GNU Affero General Public License for more details.
|
|
|
+#
|
|
|
+# You should have received a copy of the GNU Affero General Public License
|
|
|
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
+################################################################################
|
|
|
|
|
|
PATH_PRE=`type -path hpcc_setenv`
|
|
|
source ${PATH_PRE}
|
|
@@ -9,6 +24,7 @@ INIT_PID_NAME="$PID/init_`basename $PWD`.pid"
|
|
|
echo $$ > $INIT_PID_NAME
|
|
|
|
|
|
export SENTINEL="eclserver.sentinel"
|
|
|
+rm -f ${SENTINEL}
|
|
|
|
|
|
killed() {
|
|
|
PATH_PRE=`type -path hpcc_setenv`
|
|
@@ -16,7 +32,6 @@ killed() {
|
|
|
PID_NAME="$PID/`basename $PWD`.pid"
|
|
|
|
|
|
if [ -e ${SENTINEL} ]; then
|
|
|
-
|
|
|
rm -f ${SENTINEL}
|
|
|
if [ -e ${PID_NAME} ]; then
|
|
|
pidwait_fn `cat ${PID_NAME}` 3
|
|
@@ -31,11 +46,11 @@ eclserver 1>/dev/null 2>/dev/null &
|
|
|
echo $! > $PID_NAME
|
|
|
wait
|
|
|
if [ -e ${SENTINEL} ]; then
|
|
|
- sleep 5
|
|
|
- if [ -e ${SENTINEL} ]; then
|
|
|
+ sleep 5
|
|
|
+ if [ -e ${SENTINEL} ]; then
|
|
|
eclserver 1>/dev/null 2>/dev/null &
|
|
|
echo $! > $PID_NAME
|
|
|
wait
|
|
|
- fi
|
|
|
+ fi
|
|
|
fi
|
|
|
|