Add helper scripts for running from source, and document them.

This commit is contained in:
Athanasius 2022-03-18 11:56:56 +00:00
parent f8872c6dfa
commit 5b110fa554
5 changed files with 49 additions and 4 deletions

10
Bouncer.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
#
# Run the EDDN Bouncer from source
set -e
# Need to be in the src directory, relative to this script
cd "$(dirname $0)/src"
# And we invoke the *module*, not the script by filename.
python -m eddn.Bouncer $@

10
Gateway.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
#
# Run the EDDN Gateway from source
set -e
# Need to be in the src directory, relative to this script
cd "$(dirname $0)/src"
# And we invoke the *module*, not the script by filename.
python -m eddn.Gateway $@

10
Monitor.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
#
# Run the EDDN Monitor from source
set -e
# Need to be in the src directory, relative to this script
cd "$(dirname $0)/src"
# And we invoke the *module*, not the script by filename.
python -m eddn.Monitor $@

10
Relay.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
#
# Run the EDDN Relay from source
set -e
# Need to be in the src directory, relative to this script
cd "$(dirname $0)/src"
# And we invoke the *module*, not the script by filename.
python -m eddn.Relay $@

View File

@ -387,15 +387,20 @@ You have some choices for how to run the application components:
## Running scripts from source ## Running scripts from source
If you are just testing out code changes then you can choose to run If you are just testing out code changes then you can choose to run
this application directly from the source: this application directly from the source. To do so you need to reference
the correct module with `-m` rather than specifying the file directly:
``` ```sh
cd <eddn files>/src cd <eddn files>/src
python -m eddn.Gateway --config <full path to config.json> python -m eddn.Gateway --config <full path to config.json>
``` ```
If running in an environment with a POSIX 'Bourne' shell then there are
helper scripts:
Check the `systemd/eddn_<environment>_config` files for the location of ```sh
the logs directory. cd <eddn files>
./Gateway.sh --config <full path to config.json>
```
## Running from installation ## Running from installation
Otherwise you will want to utilise the `setup.py` file to build and Otherwise you will want to utilise the `setup.py` file to build and