changed deprecated 'tail -1' to 'tail -n 1'; the Java Service Wrapper team will probably change it soon, but we need this for 0.4
This commit is contained in:
@ -126,7 +126,7 @@ getpid() {
|
|||||||
if [ "X$pid" != "X" ]
|
if [ "X$pid" != "X" ]
|
||||||
then
|
then
|
||||||
# Verify that a process with this pid is still running.
|
# Verify that a process with this pid is still running.
|
||||||
pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1`
|
pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -n 1`
|
||||||
if [ "X$pid" = "X" ]
|
if [ "X$pid" = "X" ]
|
||||||
then
|
then
|
||||||
# This is a stale pid file.
|
# This is a stale pid file.
|
||||||
@ -142,7 +142,7 @@ getpid() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
testpid() {
|
testpid() {
|
||||||
pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -1`
|
pid=`$PSEXE -p $pid | grep $pid | grep -v grep | awk '{print $1}' | tail -n 1`
|
||||||
if [ "X$pid" = "X" ]
|
if [ "X$pid" = "X" ]
|
||||||
then
|
then
|
||||||
# Process is gone so remove the pid file.
|
# Process is gone so remove the pid file.
|
||||||
|
Reference in New Issue
Block a user