mirror of https://github.com/apache/jclouds.git
removed pid bracketing
This commit is contained in:
parent
e5a98cecfe
commit
8b570b499c
|
@ -43,7 +43,7 @@ function forget {
|
||||||
mkdir -p $LOG_DIR
|
mkdir -p $LOG_DIR
|
||||||
findPid $INSTANCE_NAME
|
findPid $INSTANCE_NAME
|
||||||
[ -n "$FOUND_PID" -a -f $LOG_DIR/stdout.log ] && {
|
[ -n "$FOUND_PID" -a -f $LOG_DIR/stdout.log ] && {
|
||||||
echo $INSTANCE_NAME already running pid [$FOUND_PID]
|
echo $INSTANCE_NAME already running pid $FOUND_PID
|
||||||
return 1;
|
return 1;
|
||||||
} || {
|
} || {
|
||||||
nohup $SCRIPT >$LOG_DIR/stdout.log 2>$LOG_DIR/stderr.log &
|
nohup $SCRIPT >$LOG_DIR/stdout.log 2>$LOG_DIR/stderr.log &
|
||||||
|
@ -218,7 +218,7 @@ END_OF_JCLOUDS_SCRIPT
|
||||||
status)
|
status)
|
||||||
default || exit 1
|
default || exit 1
|
||||||
findPid $INSTANCE_NAME || exit 1
|
findPid $INSTANCE_NAME || exit 1
|
||||||
echo [$FOUND_PID]
|
echo $FOUND_PID
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
default || exit 1
|
default || exit 1
|
||||||
|
|
|
@ -43,7 +43,7 @@ function forget {
|
||||||
mkdir -p $LOG_DIR
|
mkdir -p $LOG_DIR
|
||||||
findPid $INSTANCE_NAME
|
findPid $INSTANCE_NAME
|
||||||
[ -n "$FOUND_PID" -a -f $LOG_DIR/stdout.log ] && {
|
[ -n "$FOUND_PID" -a -f $LOG_DIR/stdout.log ] && {
|
||||||
echo $INSTANCE_NAME already running pid [$FOUND_PID]
|
echo $INSTANCE_NAME already running pid $FOUND_PID
|
||||||
return 1;
|
return 1;
|
||||||
} || {
|
} || {
|
||||||
nohup $SCRIPT >$LOG_DIR/stdout.log 2>$LOG_DIR/stderr.log &
|
nohup $SCRIPT >$LOG_DIR/stdout.log 2>$LOG_DIR/stderr.log &
|
||||||
|
@ -227,7 +227,7 @@ END_OF_JCLOUDS_SCRIPT
|
||||||
status)
|
status)
|
||||||
default || exit 1
|
default || exit 1
|
||||||
findPid $INSTANCE_NAME || exit 1
|
findPid $INSTANCE_NAME || exit 1
|
||||||
echo [$FOUND_PID]
|
echo $FOUND_PID
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
default || exit 1
|
default || exit 1
|
||||||
|
|
|
@ -43,7 +43,7 @@ function forget {
|
||||||
mkdir -p $LOG_DIR
|
mkdir -p $LOG_DIR
|
||||||
findPid $INSTANCE_NAME
|
findPid $INSTANCE_NAME
|
||||||
[ -n "$FOUND_PID" -a -f $LOG_DIR/stdout.log ] && {
|
[ -n "$FOUND_PID" -a -f $LOG_DIR/stdout.log ] && {
|
||||||
echo $INSTANCE_NAME already running pid [$FOUND_PID]
|
echo $INSTANCE_NAME already running pid $FOUND_PID
|
||||||
return 1;
|
return 1;
|
||||||
} || {
|
} || {
|
||||||
nohup $SCRIPT >$LOG_DIR/stdout.log 2>$LOG_DIR/stderr.log &
|
nohup $SCRIPT >$LOG_DIR/stdout.log 2>$LOG_DIR/stderr.log &
|
||||||
|
@ -198,7 +198,7 @@ END_OF_JCLOUDS_SCRIPT
|
||||||
status)
|
status)
|
||||||
default || exit 1
|
default || exit 1
|
||||||
findPid $INSTANCE_NAME || exit 1
|
findPid $INSTANCE_NAME || exit 1
|
||||||
echo [$FOUND_PID]
|
echo $FOUND_PID
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
default || exit 1
|
default || exit 1
|
||||||
|
|
|
@ -43,7 +43,7 @@ function forget {
|
||||||
mkdir -p $LOG_DIR
|
mkdir -p $LOG_DIR
|
||||||
findPid $INSTANCE_NAME
|
findPid $INSTANCE_NAME
|
||||||
[ -n "$FOUND_PID" -a -f $LOG_DIR/stdout.log ] && {
|
[ -n "$FOUND_PID" -a -f $LOG_DIR/stdout.log ] && {
|
||||||
echo $INSTANCE_NAME already running pid [$FOUND_PID]
|
echo $INSTANCE_NAME already running pid $FOUND_PID
|
||||||
return 1;
|
return 1;
|
||||||
} || {
|
} || {
|
||||||
nohup $SCRIPT >$LOG_DIR/stdout.log 2>$LOG_DIR/stderr.log &
|
nohup $SCRIPT >$LOG_DIR/stdout.log 2>$LOG_DIR/stderr.log &
|
||||||
|
@ -118,7 +118,7 @@ END_OF_JCLOUDS_SCRIPT
|
||||||
status)
|
status)
|
||||||
default || exit 1
|
default || exit 1
|
||||||
findPid $INSTANCE_NAME || exit 1
|
findPid $INSTANCE_NAME || exit 1
|
||||||
echo [$FOUND_PID]
|
echo $FOUND_PID
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
default || exit 1
|
default || exit 1
|
||||||
|
|
|
@ -44,7 +44,7 @@ function forget {
|
||||||
mkdir -p $LOG_DIR
|
mkdir -p $LOG_DIR
|
||||||
findPid $INSTANCE_NAME
|
findPid $INSTANCE_NAME
|
||||||
[ -n "$FOUND_PID" -a -f $LOG_DIR/stdout.log ] && {
|
[ -n "$FOUND_PID" -a -f $LOG_DIR/stdout.log ] && {
|
||||||
echo $INSTANCE_NAME already running pid [$FOUND_PID]
|
echo $INSTANCE_NAME already running pid $FOUND_PID
|
||||||
return 1;
|
return 1;
|
||||||
} || {
|
} || {
|
||||||
nohup $SCRIPT >$LOG_DIR/stdout.log 2>$LOG_DIR/stderr.log &
|
nohup $SCRIPT >$LOG_DIR/stdout.log 2>$LOG_DIR/stderr.log &
|
||||||
|
@ -206,7 +206,7 @@ END_OF_JCLOUDS_SCRIPT
|
||||||
status)
|
status)
|
||||||
default || exit 1
|
default || exit 1
|
||||||
findPid $INSTANCE_NAME || exit 1
|
findPid $INSTANCE_NAME || exit 1
|
||||||
echo [$FOUND_PID]
|
echo $FOUND_PID
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
default || exit 1
|
default || exit 1
|
||||||
|
|
|
@ -92,7 +92,7 @@ public class InitBuilder extends ScriptBuilder {
|
||||||
createRunScript))
|
createRunScript))
|
||||||
.put("status",
|
.put("status",
|
||||||
newStatementList(call("default"), findPid("{varl}INSTANCE_NAME{varr}"),
|
newStatementList(call("default"), findPid("{varl}INSTANCE_NAME{varr}"),
|
||||||
interpret("echo [{varl}FOUND_PID{varr}]{lf}")))
|
interpret("echo {varl}FOUND_PID{varr}{lf}")))
|
||||||
.put("stop",
|
.put("stop",
|
||||||
newStatementList(call("default"), findPid("{varl}INSTANCE_NAME{varr}"), kill()))
|
newStatementList(call("default"), findPid("{varl}INSTANCE_NAME{varr}"), kill()))
|
||||||
.put("start",
|
.put("start",
|
||||||
|
|
|
@ -209,7 +209,7 @@ public class InitScript extends ForwardingObject implements Statement, AcceptsSt
|
||||||
.put("init", newStatementList(call("default"), call(instanceName), init, createRunScript))
|
.put("init", newStatementList(call("default"), call(instanceName), init, createRunScript))
|
||||||
.put("status",
|
.put("status",
|
||||||
newStatementList(call("default"), findPid("{varl}INSTANCE_NAME{varr}"),
|
newStatementList(call("default"), findPid("{varl}INSTANCE_NAME{varr}"),
|
||||||
interpret("echo [{varl}FOUND_PID{varr}]{lf}")))
|
interpret("echo {varl}FOUND_PID{varr}{lf}")))
|
||||||
.put("stop",
|
.put("stop",
|
||||||
newStatementList(call("default"), findPid("{varl}INSTANCE_NAME{varr}"), kill()))
|
newStatementList(call("default"), findPid("{varl}INSTANCE_NAME{varr}"), kill()))
|
||||||
.put("start",
|
.put("start",
|
||||||
|
|
|
@ -10,7 +10,7 @@ function forget {
|
||||||
mkdir -p $LOG_DIR
|
mkdir -p $LOG_DIR
|
||||||
findPid $INSTANCE_NAME
|
findPid $INSTANCE_NAME
|
||||||
[ -n "$FOUND_PID" -a -f $LOG_DIR/stdout.log ] && {
|
[ -n "$FOUND_PID" -a -f $LOG_DIR/stdout.log ] && {
|
||||||
echo $INSTANCE_NAME already running pid [$FOUND_PID]
|
echo $INSTANCE_NAME already running pid $FOUND_PID
|
||||||
return 1;
|
return 1;
|
||||||
} || {
|
} || {
|
||||||
nohup $SCRIPT >$LOG_DIR/stdout.log 2>$LOG_DIR/stderr.log &
|
nohup $SCRIPT >$LOG_DIR/stdout.log 2>$LOG_DIR/stderr.log &
|
||||||
|
|
|
@ -46,7 +46,7 @@ function forget {
|
||||||
mkdir -p $LOG_DIR
|
mkdir -p $LOG_DIR
|
||||||
findPid $INSTANCE_NAME
|
findPid $INSTANCE_NAME
|
||||||
[ -n "$FOUND_PID" -a -f $LOG_DIR/stdout.log ] && {
|
[ -n "$FOUND_PID" -a -f $LOG_DIR/stdout.log ] && {
|
||||||
echo $INSTANCE_NAME already running pid [$FOUND_PID]
|
echo $INSTANCE_NAME already running pid $FOUND_PID
|
||||||
return 1;
|
return 1;
|
||||||
} || {
|
} || {
|
||||||
nohup $SCRIPT >$LOG_DIR/stdout.log 2>$LOG_DIR/stderr.log &
|
nohup $SCRIPT >$LOG_DIR/stdout.log 2>$LOG_DIR/stderr.log &
|
||||||
|
@ -120,7 +120,7 @@ END_OF_JCLOUDS_SCRIPT
|
||||||
status)
|
status)
|
||||||
default || exit 1
|
default || exit 1
|
||||||
findPid $INSTANCE_NAME || exit 1
|
findPid $INSTANCE_NAME || exit 1
|
||||||
echo [$FOUND_PID]
|
echo $FOUND_PID
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
default || exit 1
|
default || exit 1
|
||||||
|
|
|
@ -44,7 +44,7 @@ function forget {
|
||||||
mkdir -p $LOG_DIR
|
mkdir -p $LOG_DIR
|
||||||
findPid $INSTANCE_NAME
|
findPid $INSTANCE_NAME
|
||||||
[ -n "$FOUND_PID" -a -f $LOG_DIR/stdout.log ] && {
|
[ -n "$FOUND_PID" -a -f $LOG_DIR/stdout.log ] && {
|
||||||
echo $INSTANCE_NAME already running pid [$FOUND_PID]
|
echo $INSTANCE_NAME already running pid $FOUND_PID
|
||||||
return 1;
|
return 1;
|
||||||
} || {
|
} || {
|
||||||
nohup $SCRIPT >$LOG_DIR/stdout.log 2>$LOG_DIR/stderr.log &
|
nohup $SCRIPT >$LOG_DIR/stdout.log 2>$LOG_DIR/stderr.log &
|
||||||
|
@ -103,7 +103,7 @@ END_OF_JCLOUDS_SCRIPT
|
||||||
status)
|
status)
|
||||||
default || exit 1
|
default || exit 1
|
||||||
findPid $INSTANCE_NAME || exit 1
|
findPid $INSTANCE_NAME || exit 1
|
||||||
echo [$FOUND_PID]
|
echo $FOUND_PID
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
default || exit 1
|
default || exit 1
|
||||||
|
|
|
@ -43,7 +43,7 @@ function forget {
|
||||||
mkdir -p $LOG_DIR
|
mkdir -p $LOG_DIR
|
||||||
findPid $INSTANCE_NAME
|
findPid $INSTANCE_NAME
|
||||||
[ -n "$FOUND_PID" -a -f $LOG_DIR/stdout.log ] && {
|
[ -n "$FOUND_PID" -a -f $LOG_DIR/stdout.log ] && {
|
||||||
echo $INSTANCE_NAME already running pid [$FOUND_PID]
|
echo $INSTANCE_NAME already running pid $FOUND_PID
|
||||||
return 1;
|
return 1;
|
||||||
} || {
|
} || {
|
||||||
nohup $SCRIPT >$LOG_DIR/stdout.log 2>$LOG_DIR/stderr.log &
|
nohup $SCRIPT >$LOG_DIR/stdout.log 2>$LOG_DIR/stderr.log &
|
||||||
|
@ -121,7 +121,7 @@ END_OF_JCLOUDS_SCRIPT
|
||||||
status)
|
status)
|
||||||
default || exit 1
|
default || exit 1
|
||||||
findPid $INSTANCE_NAME || exit 1
|
findPid $INSTANCE_NAME || exit 1
|
||||||
echo [$FOUND_PID]
|
echo $FOUND_PID
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
default || exit 1
|
default || exit 1
|
||||||
|
|
|
@ -43,7 +43,7 @@ function forget {
|
||||||
mkdir -p $LOG_DIR
|
mkdir -p $LOG_DIR
|
||||||
findPid $INSTANCE_NAME
|
findPid $INSTANCE_NAME
|
||||||
[ -n "$FOUND_PID" -a -f $LOG_DIR/stdout.log ] && {
|
[ -n "$FOUND_PID" -a -f $LOG_DIR/stdout.log ] && {
|
||||||
echo $INSTANCE_NAME already running pid [$FOUND_PID]
|
echo $INSTANCE_NAME already running pid $FOUND_PID
|
||||||
return 1;
|
return 1;
|
||||||
} || {
|
} || {
|
||||||
nohup $SCRIPT >$LOG_DIR/stdout.log 2>$LOG_DIR/stderr.log &
|
nohup $SCRIPT >$LOG_DIR/stdout.log 2>$LOG_DIR/stderr.log &
|
||||||
|
@ -198,7 +198,7 @@ END_OF_JCLOUDS_SCRIPT
|
||||||
status)
|
status)
|
||||||
default || exit 1
|
default || exit 1
|
||||||
findPid $INSTANCE_NAME || exit 1
|
findPid $INSTANCE_NAME || exit 1
|
||||||
echo [$FOUND_PID]
|
echo $FOUND_PID
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
default || exit 1
|
default || exit 1
|
||||||
|
|
Loading…
Reference in New Issue