Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
engine-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
engine-core
Commits
8a38e7d0
Commit
8a38e7d0
authored
2 years ago
by
David Trattnig
Browse files
Options
Downloads
Patches
Plain Diff
refact: config order and debug output
parent
cffdc802
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/settings.liq
+16
-13
16 additions, 13 deletions
src/settings.liq
with
16 additions
and
13 deletions
src/settings.liq
+
16
−
13
View file @
8a38e7d0
...
...
@@ -21,7 +21,7 @@
%include "readini.liq"
default_config = "../config/engine-core.ini"
config = list.hd(default=default_config, process.read.lines("ls /etc/aura/engine-core.ini"))
print("Config file: '#{config}'")
print("
\t
Config file: '#{config}'")
ini = read_ini(config)
engine_config_folder = string.split(separator="/engine-core.ini", config)
engine_config_folder = list.nth(default="../config/", engine_config_folder, 0)
...
...
@@ -41,16 +41,26 @@ if not liquidsoap.version.at_least(liq_min_version) then
exit(1)
end
# ALLOW LIQUIDSOAP RUN AS ROOT
lqs_allow_root = get_setting("false", "liquidsoap_as_root", "AURA_ENGINE_RUN_AS_ROOT")
if lqs_allow_root == "true" then
print("\tAllow Liquidsoap running as root user: true")
settings.init.allow_root.set(true)
else
print("\tAllow Liquidsoap running as root user: false")
settings.init.allow_root.set(false)
end
# TELNET SETTINGS
telnet_server_enable = get_setting("true", "telnet_server_enable", "AURA_ENGINE_TELNET_ENABLE")
telnet_server_host = get_setting("127.0.0.1", "telnet_server_host", "AURA_ENGINE_TELNET_HOST")
telnet_server_port = int_of_string(get_setting("1234", "telnet_server_port", "AURA_ENGINE_TELNET_PORT"))
telnet_server_timeout = float_of_string(get_setting("60.", "telnet_server_timeout", "AURA_ENGINE_TELNET_SERVER_TIMEOUT"))
if telnet_server_enable != "true" then
print("Liquidsoap Telnet Server:
DISABLED
")
print("
\t
Liquidsoap Telnet Server:
disabled
")
settings.server.telnet.set(false)
else
print("Liquidsoap Telnet Server at #{telnet_server_host}:#{telnet_server_port} (#{telnet_server_timeout}s timeout)")
print("
\t
Liquidsoap Telnet Server at #{telnet_server_host}:#{telnet_server_port} (#{telnet_server_timeout}s timeout)")
settings.server.telnet.bind_addr.set(telnet_server_host)
settings.server.telnet.port.set(telnet_server_port)
settings.server.timeout.set(telnet_server_timeout)
...
...
@@ -77,26 +87,19 @@ settings.log.level.set(int_of_string(log_level))
log_dir = get_setting("../logs", "log_dir", "AURA_ENGINE_LOG_DIR")
log_file = "#{log_dir}/engine-core.log"
settings.log.file.path.set(log_file)
print "Logging to '#{log_file}' with log level #{log_level}"
print "
\t
Logging to '#{log_file}' with log level #{log_level}"
log("\tLog level #{log_level}")
# CONFIGURATION FILE
log("\tConfig file: '#{config}'")
# ALLOW LIQUIDSOAP RUN AS ROOT
lqs_allow_root = get_setting("false", "liquidsoap_as_root", "AURA_ENGINE_RUN_AS_ROOT")
if lqs_allow_root == "true" then
log("\tAllow Liquidsoap running as root user")
settings.init.allow_root.set(true)
end
# SOCKET SETTINGS
settings.server.socket.set(true)
socket_dir = get_setting("../socket", "socket_dir", "AURA_ENGINE_SOCKET_DIR")
socket_file = "#{socket_dir}/engine.sock"
settings.server.socket.path.set(socket_file)
if socket_dir != "" then
log("\tSocket location: '#{socket_file}'")
settings.server.socket.path.set(socket_file)
settings.server.socket.set(true)
else
log("\tCRITICAL: No socket directory set!")
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment