diff --git a/snapraid-runner.conf.example b/snapraid-runner.conf.example index a2ed8ce..dce416f 100644 --- a/snapraid-runner.conf.example +++ b/snapraid-runner.conf.example @@ -5,6 +5,8 @@ executable = snapraid config = snapraid.conf ; abort operation if there are more deletes than this, set to -1 to disable deletethreshold = 40 +; if you want touch to be ran each time +touch = false [logging] ; logfile to write to, leave empty to disable diff --git a/snapraid-runner.py b/snapraid-runner.py index 41a688e..becd4b9 100644 --- a/snapraid-runner.py +++ b/snapraid-runner.py @@ -151,6 +151,7 @@ def load_config(args): config["smtp"]["ssl"] = (config["smtp"]["ssl"].lower() == "true") config["scrub"]["enabled"] = (config["scrub"]["enabled"].lower() == "true") config["email"]["short"] = (config["email"]["short"].lower() == "true") + config["snapraid"]["touch"] = (config["snapraid"]["touch"].lower() == "true") if args.scrub is not None: config["scrub"]["enabled"] = args.scrub @@ -241,6 +242,11 @@ def run(): config["snapraid"]["config"]) finish(False) + if config["snapraid"]["touch"]: + logging.info("Running touch...") + snapraid_command("touch") + logging.info("*" * 60) + logging.info("Running diff...") diff_out = snapraid_command("diff", ignore_errors=True) logging.info("*" * 60)