diff --git a/scripts/iso_build.include b/scripts/iso_build.include index 2d9e75d..50a3652 100644 --- a/scripts/iso_build.include +++ b/scripts/iso_build.include @@ -1,11 +1,14 @@ #!/bin/sh ISO_BUILD_LOCK=/tmp/.daily_iso_build.sh.lock -LOCK_TIMEOUT=$((3600 * 2)) # 2 hours +LOCK_TIMEOUT=$((3600 * 12)) # 12 hours kill_stale_process() { - echo "[kill] NOT killing stale process automatically for NOW" >&2 - #local inode=$(stat -L --format '%i' "${ISO_BUILD_LOCK}") # ignore device... - #local pids=$(cat /proc/locks | grep ":${inode}" | awk '{ print $5 }') - return 1 + echo "[kill] NOT killing stale processes automatically: " >&2 + local pids=$(lsof "${ISO_BUILD_LOCK}" | tail -n +2 | awk '{ print $2 }') + echo ${pids} >&2 + #for pid in ${pids}; do + # kill -TERM ${pid} + #done + return 0 }