dotfiles

config files and scripts at HOME.
git clone git://git.ricketyspace.net/dotfiles.git
Log | Files | Refs

commit b899b45792e174563ee6c066c455cc57132a3804
parent c09f05a68c974b1664ffd15e3ab68f82cbfd6e1c
Author: rsiddharth <rsiddharth@ninthfloor.org>
Date:   Tue, 22 Mar 2016 01:23:20 -0400

update rsync-bu-chum

 - it quits if another instance of itself is already running.

Diffstat:
.bin/rsync-bu-chum | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/.bin/rsync-bu-chum b/.bin/rsync-bu-chum @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2015 rsiddharth <s@ricketyspace.net> +# Copyright (C) 205-2016 rsiddharth <s@ricketyspace.net> # # This program is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as @@ -16,6 +16,12 @@ # along with this program (see COPYING). If not, see # <http://www.gnu.org/licenses/>. +# quit if it is already running +if test $(pgrep -c rsync-bu-chum) -gt 1; then + echo "Quitting, $0 already running." + exit 0 +fi + if [ -d $CHUM_BACKUP_PATH ]; then echo "rsyncing..." rsync -ravz --delete-excluded --files-from=$CHUM_FILTER $HOME $CHUM_BACKUP_PATH