From f163eb1e2c473c71235f4e851be829388ed5de71 Mon Sep 17 00:00:00 2001 From: Clemens Klug Date: Wed, 10 Apr 2019 10:41:46 +0200 Subject: [PATCH] fix readme, use arguments in discover, too --- Readme.md | 6 +++++- discover.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index 21303eb..82ee1ed 100644 --- a/Readme.md +++ b/Readme.md @@ -17,7 +17,7 @@ Examples: ### pre/post exec -e.g. `python3 start.py test.lst -a ps --pre 'echo {path} {step}' --post './sample/notify_telegram.sh {path} {cmd} {returncode} \n {stdout}'` +e.g. `python3 discover.py ./sample/ -a ps --pre 'echo {path} {step}' --post './sample/notify_telegram.sh {path} {cmd} {returncode} \n {stdout}'` ## manual config @@ -32,3 +32,7 @@ e.g. `python3 start.py test.lst -a ps --pre 'echo {path} {step}' --post './sampl ### other actions * default action: up -d * add argument -a "" + +### pre/post exec + +e.g. `python3 start.py test.lst -a ps --pre 'echo {path} {step}' --post './sample/notify_telegram.sh {path} {cmd} {returncode} \n {stdout}'` \ No newline at end of file diff --git a/discover.py b/discover.py index 066ac07..66b3687 100644 --- a/discover.py +++ b/discover.py @@ -70,4 +70,4 @@ if __name__ == "__main__": else: import start for service in autostarts: - start.change_service(service, args.action) \ No newline at end of file + start.change_service(service, args.action, pre_cmd=args.pre, post_cmd=args.post) \ No newline at end of file