Update launch scripts to sort storage by input/output and year
This commit is contained in:
@@ -90,9 +90,9 @@ pid_path="$working_directory/$pid_filename"
|
||||
## Process task
|
||||
if [ "$task" = "launch" ]; then
|
||||
# verify process isn't running yet
|
||||
pid=$(head -n 1 $pid_path)
|
||||
pid=$(head -n 1 $pid_path 2>/dev/null)
|
||||
# if the pid exists, check the process status using ps
|
||||
if ps -p $pid > /dev/null; then
|
||||
if ps -p $pid &>/dev/null; then
|
||||
# if it is in ps, then it's still running
|
||||
echo still running
|
||||
exit 1
|
||||
@@ -127,7 +127,7 @@ elif [ "$task" = "get_status" ] || [ "$task" = "get_status_cleaned_input" ]; the
|
||||
exit
|
||||
fi
|
||||
|
||||
pid=$(head -n 1 $pid_path)
|
||||
pid=$(head -n 1 $pid_path 2>/dev/null)
|
||||
# if the pid exists, check the process status using ps
|
||||
if ps -p $pid > /dev/null; then
|
||||
# if it is in ps, then it's still running
|
||||
@@ -161,7 +161,7 @@ elif [ "$task" = "get_status" ] || [ "$task" = "get_status_cleaned_input" ]; the
|
||||
fi
|
||||
fi
|
||||
elif [ "$task" = "cleanup" ]; then
|
||||
pid=$(head -n 1 $pid_path)
|
||||
pid=$(head -n 1 $pid_path 2>/dev/null)
|
||||
# if the pid exists, check the process status using ps
|
||||
if ps -p $pid > /dev/null; then
|
||||
# if it is in ps, then it's still running
|
||||
@@ -176,7 +176,7 @@ elif [ "$task" = "kill" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
pid=$(head -n 1 $pid_path)
|
||||
pid=$(head -n 1 $pid_path 2>/dev/null)
|
||||
# if the pid exists, check the process status using ps
|
||||
if ps -p $pid > /dev/null; then
|
||||
# if it is in ps, then it's still running
|
||||
|
||||
Reference in New Issue
Block a user