diff options
Diffstat (limited to 'nopsyncd')
-rw-r--r-- | nopsyncd/conf.lua | 2 | ||||
-rw-r--r-- | nopsyncd/nopsyncd.conf | 4 | ||||
-rwxr-xr-x | nopsyncd/tcpserver.lua | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/nopsyncd/conf.lua b/nopsyncd/conf.lua index ee5487d..83257b5 100644 --- a/nopsyncd/conf.lua +++ b/nopsyncd/conf.lua @@ -21,7 +21,7 @@ local conf = {} -local file = assert(io.open("/etc/rhnop/nopsyncd.conf", "r")) +local file = assert(io.open("nopsyncd.conf", "r")) for line in file:lines() do local k,v = string.match(line, "^([^=#]+)=(.*)$") if k and v and v ~= "" then diff --git a/nopsyncd/nopsyncd.conf b/nopsyncd/nopsyncd.conf index cf324e7..0338cb6 100644 --- a/nopsyncd/nopsyncd.conf +++ b/nopsyncd/nopsyncd.conf @@ -1,4 +1,6 @@ queue_name=/rhnop +tcp_host=* +tcp_port=2345 rddb_db=rivendell rddb_host=127.0.0.1 @@ -8,6 +10,6 @@ rddb_pwd= playlog_db=rhnop playlog_host=127.0.0.1 -#playlog_port=3307 +#playlog_port=3306 playlog_user= playlog_pwd= diff --git a/nopsyncd/tcpserver.lua b/nopsyncd/tcpserver.lua index 3b4c777..bd945b6 100755 --- a/nopsyncd/tcpserver.lua +++ b/nopsyncd/tcpserver.lua @@ -21,11 +21,13 @@ require "socket" +conf = require "conf" + function init_server() local server = assert(socket.tcp()) assert(server:setoption('reuseaddr', true)) - assert(server:bind("*", 2342)) + assert(server:bind(conf.tcp_host, conf.tcp_port)) assert(server:listen(5)) return server |