I'm using the example auth to attempt sqlite auth...the script is simple
since i'm learning-as-i-go....
I'm hung-up on a problem where ls complains:
Line 17, char 8 before "=": Parse error!
the line is:
ret = list.hd(ret)
Here is the full test-script... its probably something really simple that
i'm overlooking. Thanks for your time.
#!/usr/bin/liquidsoap
################################################################################
# Log dir
set("log.file.path","/tmp/basic-radio.log")
def auth(user,password) =
# Call an external process to check
# the credentials:
# The script will return the string
# "true" of "false"
#
# First call the script
ret = get_process_lines("/usr/bin/sqlite3 -separator ' ' auth.db 'select
* from deejays where user="#{user}"'")
# from example on ls site... --user=#{user} --password=#{password}")
# Then get the first line of its output
ret = list.hd(ret)
# Finally returns the boolean represented
# by the output (bool_of_string can also
# be used)
if ret == "true" then
true
else
false
end
end
################################################################################
files = single("/mnt/some/noise.mp3")
################################################################################
# Lets build a harbor...
set("harbor.bind_addr","0.0.0.0")
dj_harbor =
input.harbor("/",auth=auth,port=6846,icy=true,buffer=30.,max=60.)
################################################################################
radio = fallback(track_sensitive=false,
[dj_harbor,files])
################################################################################
#Playout to Alsa on first soundcard hw:0,0 and enjoy crackles :)
output.alsa(fallible=true,device="hw:0,0",radio)
################################################################################
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Savonet-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-users