Add support for running snapraid touch (#11)
This commit is contained in:
1 parent
4b9eb7bf9f
commit
d1fef79c72
2 files changed
+8
No files matched your search
@@ -5,6 +5,8 @@ executable = snapraid
|
|||||||
config = snapraid.conf
|
config = snapraid.conf
|
||||||
; abort operation if there are more deletes than this, set to -1 to disable
|
; abort operation if there are more deletes than this, set to -1 to disable
|
||||||
deletethreshold = 40
|
deletethreshold = 40
|
||||||
|
; if you want touch to be ran each time
|
||||||
|
touch = false
|
||||||
|
|
||||||
[logging]
|
[logging]
|
||||||
; logfile to write to, leave empty to disable
|
; logfile to write to, leave empty to disable
|
||||||
|
|||||||
@@ -151,6 +151,7 @@ def load_config(args):
|
|||||||
config["smtp"]["ssl"] = (config["smtp"]["ssl"].lower() == "true")
|
config["smtp"]["ssl"] = (config["smtp"]["ssl"].lower() == "true")
|
||||||
config["scrub"]["enabled"] = (config["scrub"]["enabled"].lower() == "true")
|
config["scrub"]["enabled"] = (config["scrub"]["enabled"].lower() == "true")
|
||||||
config["email"]["short"] = (config["email"]["short"].lower() == "true")
|
config["email"]["short"] = (config["email"]["short"].lower() == "true")
|
||||||
|
config["snapraid"]["touch"] = (config["snapraid"]["touch"].lower() == "true")
|
||||||
|
|
||||||
if args.scrub is not None:
|
if args.scrub is not None:
|
||||||
config["scrub"]["enabled"] = args.scrub
|
config["scrub"]["enabled"] = args.scrub
|
||||||
@@ -241,6 +242,11 @@ def run():
|
|||||||
config["snapraid"]["config"])
|
config["snapraid"]["config"])
|
||||||
finish(False)
|
finish(False)
|
||||||
|
|
||||||
|
if config["snapraid"]["touch"]:
|
||||||
|
logging.info("Running touch...")
|
||||||
|
snapraid_command("touch")
|
||||||
|
logging.info("*" * 60)
|
||||||
|
|
||||||
logging.info("Running diff...")
|
logging.info("Running diff...")
|
||||||
diff_out = snapraid_command("diff", ignore_errors=True)
|
diff_out = snapraid_command("diff", ignore_errors=True)
|
||||||
logging.info("*" * 60)
|
logging.info("*" * 60)
|
||||||
|
|||||||
Reference in new issue
Block a user