From 9df670eeb430f92da25d6dd0f0c8874703e1feb0 Mon Sep 17 00:00:00 2001 From: Charadon Date: Sat, 6 Aug 2022 12:18:58 -0400 Subject: Changed some defaults, and made pid detection more portable hopefully. --- dscip | 2 +- failed.sh | 1 + post.sh | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dscip b/dscip index 5d86b93..4958fb1 100755 --- a/dscip +++ b/dscip @@ -35,7 +35,7 @@ set -u # Check if script is currently running, and if not, reset LOCK # if [ -f "$WORKING_DIRECTORY/LOCK" ]; then LOCKED_PID=$(cat "$WORKING_DIRECTORY/LOCK") - if ps -p "$LOCKED_PID" > /dev/null; then + if ps -aux | grep [^]]"$LOCKED_PID" > /dev/null; then echo "Script still running. Exiting..." exit 0 else diff --git a/failed.sh b/failed.sh index e1e0f02..1477e12 100755 --- a/failed.sh +++ b/failed.sh @@ -6,6 +6,7 @@ set -eu # Below is an example of uploading the output.txt to an ftp server. ftp -in <