mirror of
https://github.com/rocky-linux/rocky-tools.git
synced 2024-11-26 06:56:25 +00:00
Update mirrorsync.sh
Redirect stderr of kill to /dev/null
This commit is contained in:
parent
343a2269b2
commit
06d824e9df
@ -63,7 +63,7 @@ fi
|
|||||||
|
|
||||||
# Check for existing lockfile to avoid multiple simultaneously running syncs
|
# Check for existing lockfile to avoid multiple simultaneously running syncs
|
||||||
# If lockfile exists but process is dead continue anyway
|
# 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
|
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}."
|
logger -t rsync "Warning: lockfile exists but process dead, continuing with updating ${mirrormodule}."
|
||||||
rm -f "$lockfile"
|
rm -f "$lockfile"
|
||||||
|
Loading…
Reference in New Issue
Block a user