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