rmlockfile - remove an orphaned lockfile when its process has finished
rmlockfile [options]
Options
-------
--process,-p process name to check is running
--filepath,-f path of the lockfile to remove if process is not running
--help,-h display these options
Command line examples
---------------------
$ ./rmlockfile --process keepassx --filepath ~/Documents/vault.kdb.lock
$ ./rmlockfile -p keepassx -f ~/Documents/vault.kdb.lock
Crontab example
---------------
* * * * * /home/user1/rmlockfile -p keepassx -f /home/user1/Documents/vault.kdb.lockrmlockfile is a lightweight program for tidying up orphaned lockfiles after their process has finished. My primary use-case for this was keepassx, which will always leave behind a lockfile if interrupted or terminated.
Perl v5.8 or higher, GNU Bash (tested on v4.3.42, Fedora 22)
David Farrell © 2015
FreeBSD, see LICENSE