diff --git a/snapraid-runner.conf.example b/snapraid-runner.conf.example index 419cc41..0cc615f 100644 --- a/snapraid-runner.conf.example +++ b/snapraid-runner.conf.example @@ -1,6 +1,6 @@ [snapraid] -; path to the snapraid executable -executable = +; path to the snapraid executable (e.g. /bin/snapraid) +executable = snapraid ; path to the snapraid config to be used config = snapraid.conf ; abort operation if there are more deletes than this, set to -1 to disable diff --git a/snapraid-runner.py b/snapraid-runner.py index 8c768b6..14afd88 100644 --- a/snapraid-runner.py +++ b/snapraid-runner.py @@ -217,11 +217,12 @@ def run(): logging.info("Run started") logging.info("=" * 60) - if not os.path.exists(config["snapraid"]["executable"]): - logging.error("Snapraid executable does not exist at " + - config["snapraid"]["executable"]) + if not os.path.isfile(config["snapraid"]["executable"]): + logging.error("The configured snapraid executable \"{}\" does not " + "exist or is not a file".format( + config["snapraid"]["executable"])) finish(False) - if not os.path.exists(config["snapraid"]["config"]): + if not os.path.isfile(config["snapraid"]["config"]): logging.error("Snapraid config does not exist at " + config["snapraid"]["config"]) finish(False)