Commit 1796e9a5 authored by David Trattnig's avatar David Trattnig
Browse files

Moved "configuration" to "config". #50

parent 1e706ae8
......@@ -4,11 +4,11 @@
logs
tmp
.vscode/tags
configuration/engine.ini
config/engine.ini
script/.engine.install-db.lock
.engine.install-db.lock
configuration/systemd/dev/
config/systemd/dev/
env.list
audio/source
configuration/docker/engine.ini
config/docker/engine.ini
modules/liquidsoap/engine.sock
\ No newline at end of file
......@@ -21,7 +21,7 @@ before_script:
- mkdir /etc/aura
- mkdir /var/log/aura
- pwd
- cp configuration/sample-production.engine.ini configuration/engine.ini
- cp config/sample-production.engine.ini config/engine.ini
no_test_cases:
stage: test
......
......@@ -144,7 +144,7 @@ fallback_max_blank="20."
fallback_min_noise="0."
fallback_threshold="-50."
# A playlist holding music for Station Fallbacks (optonal)
fallback_music_playlist= "/home/username/code/aura/configuration/playlists/station-fallback-playlist.m3u"
fallback_music_playlist= "/home/username/code/aura/config/playlists/station-fallback-playlist.m3u"
# A folder holding music for Station Fallbacks (optional)
fallback_music_folder="/var/audio/station"
# The time in seconds how often the folder should be re-scanned
......
......@@ -143,7 +143,7 @@ fallback_max_blank="20."
fallback_min_noise="0."
fallback_threshold="-50."
# A playlist holding music for Station Fallbacks (optonal)
fallback_music_playlist= "/opt/aura/engine/configuration/playlists/station-fallback-playlist.m3u"
fallback_music_playlist= "/opt/aura/engine/config/playlists/station-fallback-playlist.m3u"
# A folder holding music for Station Fallbacks (optional)
fallback_music_folder="/var/audio/station"
# The time in seconds how often the folder should be re-scanned
......
......@@ -143,7 +143,7 @@ fallback_max_blank="20."
fallback_min_noise="0."
fallback_threshold="-50."
# A playlist holding music for Station Fallbacks (optonal)
fallback_music_playlist= "/opt/aura/engine/configuration/playlists/station-fallback-playlist.m3u"
fallback_music_playlist= "/opt/aura/engine/config/playlists/station-fallback-playlist.m3u"
# A folder holding music for Station Fallbacks (optional)
fallback_music_folder="/var/audio/station"
# The time in seconds how often the folder should be re-scanned
......
......@@ -94,7 +94,7 @@ This script does the following:
- Install Liquidsoap components using OPAM (`script/install-opam-packages`)
- NodeJS Modules (`script/install-web.sh`)
- Python Packages (`requirements.txt`)
- Creates a default configuration file in `configuration/engine.ini`
- Creates a default configuration file in `config/engine.ini`
When this is completed, carefully check if any error occured.
......@@ -104,7 +104,7 @@ When this is completed, carefully check if any error occured.
In your development environment edit following file to configure the engine:
```shell
./configuration/engine.ini
./config/engine.ini
```
Please note if some configuration exists under `/etc/aura/engine.ini` the configuration is
......
......@@ -223,7 +223,7 @@ For this you can utilize either [Systemd](https://systemd.io/) or [Supervisor](h
### Running with Systemd
Copy the unit file `/opt/aura/engine/configuration/systemd/aura-engine.service` to `/etc/systemd/system/`.
Copy the unit file `/opt/aura/engine/config/systemd/aura-engine.service` to `/etc/systemd/system/`.
This unit file starts engine-core and engine-liquidsoap within one command. Here Liquidsoap is started as
as subprocess.
......@@ -270,7 +270,7 @@ supervisord
```
This picks up the supervisor configuration provided in the local `supervisord.conf` and the service configurations
located in `configuration/supervisor/*.conf`.
located in `config/supervisor/*.conf`.
Experience has shown it might be helpful to reload the supervisor configuration using `sudo`:
......
......@@ -29,7 +29,7 @@ try the [Standard Installation](docs/installation-development).
Create a default configuration and edit according to your settings
```shell
cp configuration/sample-docker.engine.ini configuration/docker/engine.ini
cp config/sample-docker.engine.ini config/docker/engine.ini
```
Create a symlink in `./audio` to point to the audio source of tank
......
......@@ -39,8 +39,8 @@ if [ $mode == "dev" ]; then
echo "Create local 'logs' Folder ..."
mkdir -p logs
echo "Copy configuration to './configuration/engine.ini'"
cp -n configuration/sample-development.engine.ini configuration/engine.ini
echo "Copy configuration to './config/engine.ini'"
cp -n config/sample-development.engine.ini config/engine.ini
fi
......@@ -53,7 +53,7 @@ if [ $mode == "prod" ]; then
mkdir -p tmp
echo "Copy default Engine configuration to '/etc/aura/engine.ini'"
cp -n configuration/sample-production.engine.ini /etc/aura/engine.ini
cp -n config/sample-production.engine.ini /etc/aura/engine.ini
fi
......
......@@ -40,7 +40,7 @@ class AuraConfig:
def __init__(self, ini_path="/etc/aura/engine.ini"):
"""
Initializes the configuration, defaults to `/etc/aura/engine.ini`.
If this file doesn't exist it uses `./configuration/engine.ini` from
If this file doesn't exist it uses `./config/engine.ini` from
the project directory.
Args:
......@@ -49,7 +49,7 @@ class AuraConfig:
self.logger = logging.getLogger("AuraEngine")
config_file = Path(ini_path)
if not config_file.is_file():
ini_path = "%s/configuration/engine.ini" % Path(__file__).parent.parent.parent.absolute()
ini_path = "%s/config/engine.ini" % Path(__file__).parent.parent.parent.absolute()
self.ini_path = ini_path
self.load_config()
......
......@@ -19,12 +19,12 @@
# READ INI FILE
%include "readini.liq"
default_config = "../../configuration/engine.ini"
default_config = "../../config/engine.ini"
config = list.hd(default=default_config, get_process_lines("ls /etc/aura/engine.ini"))
log("Config file used: #{config}")
ini = read_ini(config)
engine_config_folder = string.split(separator="/engine.ini", config)
engine_config_folder = list.nth(default="../../configuration/", engine_config_folder, 0)
engine_config_folder = list.nth(default="../../config/", engine_config_folder, 0)
# ALLOW LIQUIDSOAP RUN AS ROOT
lqs_allow_root = list.assoc(default="false", "liquidsoap_as_root", ini)
......
......@@ -98,7 +98,7 @@ if [[ $docker == "true" ]]; then
-u $UID:$GID \
-v "$BASE_D":/srv \
-v "$BASE_D/audio/source":/var/audio/source:ro \
-v "$BASE_D/configuration/docker":/etc/aura \
-v "$BASE_D/config/docker":/etc/aura \
-v "/dev/snd":/dev/snd \
--privileged \
--tmpfs /var/log/aura/ \
......
......@@ -19,4 +19,4 @@ chown -R engineuser:engineuser /var/log/aura
chown -R engineuser:engineuser /var/log/supervisor
echo "Copy Systemd unit files to '/etc/systemd/system/'"
cp -n /opt/aura/engine/configuration/systemd/* /etc/systemd/system/
\ No newline at end of file
cp -n /opt/aura/engine/config/systemd/* /etc/systemd/system/
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment