From f35b90d5d4995b731eb69c31fffbe08b443d97bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Diemer?= <stephane.diemer@ubicast.eu> Date: Wed, 25 Jan 2017 09:18:27 +0100 Subject: [PATCH] Changed readme. --- README.md | 20 ++++++++++++++------ envsetup.py | 2 +- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b4a9d1c6..47dc63a3 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,19 @@ Script to setup and configure softwares used in our servers. ## How to add a software setup * Add a folder next to "envsetup.py" named using the following pattern: "<number>.<name>". -The number should not be used by any other setup. -* Add a file named "0_setup.py" in this folder. -* Add a the actions that have to be done in a function named "setup" in the "0_setup.py" file. + The number should not be used by any other setup. -## Notes +* Add a file named "0_setup.py" or "0_setup.sh" in this folder. -* All the adjustable configurations must be in the "conf.py" file. -* The "setup" function should be non interactive. +* If the file you use is the python one ("0_setup.py"), you should add a function named setup in it. + The file will be run with python3. + For example: + ```python + def setup(interactive=True): + pass + ``` + +## Important notes + +* All setup actions should be safe to be run multiple times (to allow reconfiguration of the service). +* All the adjustable configurations must be in the "conf.sh" file. diff --git a/envsetup.py b/envsetup.py index 1dcc7267..82cf1f49 100755 --- a/envsetup.py +++ b/envsetup.py @@ -91,7 +91,7 @@ class EnvSetup(): log(' c: Configuration status') log(' e: Exit\n') log('Info:') - log('\033[0;36m To setup a system entirely for a determined purpose (Worker, MS, CM, ...), you can use the launcher:\033[0m') + log('\033[0;36m To setup a system entirely for a determined purpose (Worker, MS, CM, ...), you should use the launcher:\033[0m') log('\033[0;36m bash /root/envsetup/launcher.sh\033[0m') log('\nWhat action do you want to start ?') try: -- GitLab