diff options
-rw-r--r-- | rhnop-server/debian/control | 2 | ||||
-rw-r--r-- | rhnop-server/debian/rhnop-server.runit | 2 | ||||
-rwxr-xr-x | rhnop-server/debian/rules | 1 | ||||
-rwxr-xr-x | rhnop-server/noprml | 7 | ||||
-rw-r--r-- | rhnop-server/playlog.lua | 3 | ||||
-rw-r--r-- | rhnop-server/qlistener.lua | 7 |
6 files changed, 15 insertions, 7 deletions
diff --git a/rhnop-server/debian/control b/rhnop-server/debian/control index 1df71d3..97b440e 100644 --- a/rhnop-server/debian/control +++ b/rhnop-server/debian/control @@ -8,7 +8,7 @@ Homepage: http://www.helsinki.at/ Package: rhnop-server Architecture: any -Depends: ${shlibs:Depends}, adduser, liblua5.1-mq, liblua5.1-socket2, liblua5.1-sql-mysql-2, liblua5.1-posix1, runit +Depends: ${shlibs:Depends}, adduser, liblua5.1-mq, liblua5.1-socket2, liblua5.1-sql-mysql-2, liblua5.1-posix1, lua5.1, runit Description: Radio Helsinki now playing information system - server The Radio Helsinki now playing information system gathers the now playing info into an mysql database for further processing. diff --git a/rhnop-server/debian/rhnop-server.runit b/rhnop-server/debian/rhnop-server.runit index 0fc95ff..b559b3e 100644 --- a/rhnop-server/debian/rhnop-server.runit +++ b/rhnop-server/debian/rhnop-server.runit @@ -1,3 +1,3 @@ #!/bin/sh -chpst -u rhnop:rhnop /usr/bin/rhnop-server +chpst -u rhnop:rhnop /usr/bin/nopsyncd diff --git a/rhnop-server/debian/rules b/rhnop-server/debian/rules index f697191..253a294 100755 --- a/rhnop-server/debian/rules +++ b/rhnop-server/debian/rules @@ -54,6 +54,7 @@ binary-arch: install dh_compress dh_fixperms chmod 640 debian/rhnop-server/etc/rhnop/nopsyncd.conf + chmod 755 debian/rhnop-server/etc/svn/rhnop-server/run dh_installdeb dh_shlibdeps dh_gencontrol diff --git a/rhnop-server/noprml b/rhnop-server/noprml index 9c572b2..6065948 100755 --- a/rhnop-server/noprml +++ b/rhnop-server/noprml @@ -47,8 +47,11 @@ end posix.umask("rwxrwxr-x") local q, err = mq.create(queue_name, "wo", "rw-rw----") if q == nil then - io.stderr:write("creation of message queue failed: " .. err .. "\n") - os.exit(1) + q, err = mq.open(queue_name, "wo") + if q == nil then + io.stderr:write("creation of message queue failed: " .. err .. "\n") + os.exit(1) + end end -- send out message to nopsyncd diff --git a/rhnop-server/playlog.lua b/rhnop-server/playlog.lua index 37b9ea6..99fc5fe 100644 --- a/rhnop-server/playlog.lua +++ b/rhnop-server/playlog.lua @@ -23,7 +23,8 @@ require "luasql.mysql" -- CREATE DATABASE rhnop -- GRANT select,insert,update ON rhnop.* TO 'nopsyncd' IDENTIFIED BY '123456'; --- CREATE TABLE IF NOT EXISTS now (timestamp VARCHAR(16) PRIMARY KEY NOT NULL, cart INT NOT NULL, len INT, showtitle VARCHAR(255), title VARCHAR(255), artist VARCHAR(255), album VARCHAR(255), ismusic BOOLEAN) +-- USE rhnop +-- CREATE TABLE IF NOT EXISTS now (timestamp VARCHAR(16) PRIMARY KEY NOT NULL, cart INT NOT NULL, len INT, showtitle VARCHAR(255), title VARCHAR(255), artist VARCHAR(255), album VARCHAR(255), ismusic BOOLEAN); conf = require "conf" diff --git a/rhnop-server/qlistener.lua b/rhnop-server/qlistener.lua index 783db5e..b419737 100644 --- a/rhnop-server/qlistener.lua +++ b/rhnop-server/qlistener.lua @@ -62,8 +62,11 @@ function main_loop() posix.umask("rwxrwxr-x") local q, err = mq.create(conf.queue_name, "ro", "rw-rw----") if q == nil then - io.stderr:write("creation of message queue failed: " .. err .. "\n") - os.exit(1) + q, err = mq.open(queue_name, "wo") + if q == nil then + io.stderr:write("creation of message queue failed: " .. err .. "\n") + os.exit(1) + end end local ret, err = playlog:init() |