Autocommit of file /home/julien/scripts/autosync-xdg-launcher.sh changed on host...
[dotfiles/scripts.git] / autosync-xdg-launcher.sh
index ecd88e7..6450f74 100755 (executable)
@@ -4,6 +4,12 @@
 conf=${XDG_CONF_HOME:-$HOME/.config}/autosync
 data=${XDG_DATA_HOME:-$HOME/.local/share}/autosync
 mkdir -p $data/log
+
+# Automatically delete logs older than 5 days
+find $data/log/ -name '*.log' -ctime 5 -delete
+
+# Only starts configuration files ending with .conf
+# which makes it easy to disable some
 for i in $conf/*.conf
 do
     pkill -f "python.*dvcs-autosync .*autosync/$(basename $i)"