diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c0fde79 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +snapraid-runner.conf diff --git a/snapraid-runner.conf b/snapraid-runner.conf.example similarity index 91% rename from snapraid-runner.conf rename to snapraid-runner.conf.example index 3d581f9..419cc41 100644 --- a/snapraid-runner.conf +++ b/snapraid-runner.conf.example @@ -15,6 +15,8 @@ maxsize = 5000 [email] ; when to send an email, comma-separated list of [success, error] sendon = success,error +; set to false to get full programm output via email +short = true subject = [SnapRAID] Status Report: from = to = diff --git a/snapraid-runner.py b/snapraid-runner.py index d7adf64..1227c8f 100644 --- a/snapraid-runner.py +++ b/snapraid-runner.py @@ -165,6 +165,11 @@ def main(): help="Configuration file (default %(default)s)") args = parser.parse_args() + if not os.path.exists(args.conf): + print("snapraid-runner configuration file not found") + args.print_help() + sys.exit(2) + try: load_config(args.conf) except: