rsync-time-backup
rsync-time-backup copied to clipboard
Improved fix to assure only one instance is running.
The command 'pgrep -o -f "$APPNAME"' is not safe, as it might return, e.g. a running editor session where something with $APPNAME is edited!
Also, some users might want to run two backups simultaneously:
rsync-time-backup => DEST1 (oldest PID) rsync-time-backup => DEST2 (2nd oldest PID)
In that case, simply comparing the oldest PID of APPNAME with RUNNINGPID will not prevent starting of several instances of the backup to DEST2.
Instead one should check, as done for cygwin (some lines above), whether the process currently running under RUNNINGPID is identical with $APPNAME.
Pr #129 fixes the same (did not see before, sorry), with less tools and the same way as netbsd.