2 # This simple script will start autosync.py daemons for all configs found in $XDG_CONF_HOME/autosync/,
3 # stopping any existing daemons with that config first.
4 conf=${XDG_CONF_HOME:-$HOME/.config}/autosync
5 data=${XDG_DATA_HOME:-$HOME/.local/share}/autosync
6 mkdir -p $data/{log,pid}
8 # Automatically delete logs older than 5 days
9 find $data/log/ -name '*.log' -ctime +5 -delete
11 # Only starts configuration files ending with .conf
12 # which makes it easy to disable some
15 pkill -u $(whoami) -f "python.*dvcs-autosync .*autosync/$(basename $i)"
16 dvcs-autosync $i &> $data/log/$(basename $i).$(date '+%F-%T').log &