Update mirrorsync.sh

Redirect stderr of kill to /dev/null
This commit is contained in:
Dennis Körner 2021-06-03 12:44:27 +02:00 committed by GitHub
parent 343a2269b2
commit 06d824e9df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,7 +63,7 @@ fi
# Check for existing lockfile to avoid multiple simultaneously running syncs
# If lockfile exists but process is dead continue anyway
if [[ -e "$lockfile" ]] && ! kill -0 "$(< "$lockfile")"; then
if [[ -e "$lockfile" ]] && ! kill -0 "$(< "$lockfile")" 2>/dev/null; then
printf "Warning: lockfile exists but process dead, continuing.\n" >> "$logfile" 2>&1
logger -t rsync "Warning: lockfile exists but process dead, continuing with updating ${mirrormodule}."
rm -f "$lockfile"