Commit cd1ef4b8 authored by Your Name's avatar Your Name
Browse files

env var liq example

parent d191fb4b
## example showing how to use environment variables
## test with: SMS_ICECAST_HOST=deathstar.puscii.nl SMS_ICECAST_PASSWORD=adsf SMS_INPUT_PASSWORD=asdf liquidsoap with_env_vars.liq
#
# But the idea is that you can pass the server / password with a systemd unit file:
# [Unit]
# Description=Liquidsoap script
#
# [Service]
# ExecStart=/usr/bin/liquidsoap with_env_vars.liq
#
# ## either specify the passwords directly in the unit file (by templating them)
# Environment="SMS_ICECAST_PASSWORD=JP8YLOc2bsNlrGuD6LVTq7L36obpjzxd"
#
# ## or you can use a "Environmentfile", on debian the proper place to put those would be in /etc/default/
# EnvironmentFile=/etc/default/sms
#
# [Install]
# WantedBy=multi-user.target
# We're 48k!
set("frame.audio.samplerate",48000)
# Use the telnet server for requests
#set("server.telnet", true)
set("server.telnet.port", 2023)
set("server.telnet", true)
input_pass = getenv("SMS_INPUT_PASSWORD")
icecast_pass = getenv("SMS_ICECAST_PASSWORD")
server = getenv("SMS_ICECAST_HOST")
set("frame.duration",0.16)
set("log.file.path","/dev/null")
set("log.stdout",true)
live = mksafe(input.jack(id="liquidsoap-ls1ls2", buffer_size=8, clock_safe=false))
%include "pap-streams.liq"
icecast_flac(live, mount="pap-ls1.flac", host=server, port=8000, password=icecast_pass)
icecast_mp3(live, mount="pap-ls1.mp3", host=server, port=8000, password=icecast_pass)
icecast_opus(live,mount="pap-ls1.opus", host=server, port=8000, password=icecast_pass)
Markdown is supported
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