summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--debian/rhnop-server.install4
-rw-r--r--debian/rhnop-server.nopfetchd.service (renamed from debian/rhnop-server.nopsyncd.service)2
-rwxr-xr-xdebian/rules2
-rw-r--r--src/Makefile6
-rwxr-xr-xsrc/configure6
-rw-r--r--src/l_pipe.h4
-rwxr-xr-xsrc/nopcollectd5
-rw-r--r--src/nopfetchd.c (renamed from src/nopsyncd.c)10
-rw-r--r--src/nopfetchd.conf (renamed from src/nopsyncd.conf)0
-rwxr-xr-xsrc/noprml4
-rwxr-xr-xsrc/nopsysstated5
-rw-r--r--src/playlog.lua2
-rw-r--r--src/qlistener.lua2
-rw-r--r--src/tcpserver.lua2
15 files changed, 23 insertions, 33 deletions
diff --git a/.gitignore b/.gitignore
index dbc5999..963d785 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
src/include.mk
-src/nopsyncd
+src/nopfetchd
src/config.h
src/*.o
src/*.d
diff --git a/debian/rhnop-server.install b/debian/rhnop-server.install
index b51dc4b..fbe4c09 100644
--- a/debian/rhnop-server.install
+++ b/debian/rhnop-server.install
@@ -1,6 +1,6 @@
usr/bin/noprml
-usr/bin/nopsyncd
-etc/rhnop/nopsyncd.conf
+usr/bin/nopfetchd
+etc/rhnop/nopfetchd.conf
usr/share/rhnop/rddb.lua
usr/share/rhnop/playlog.lua
usr/share/rhnop/qlistener.lua
diff --git a/debian/rhnop-server.nopsyncd.service b/debian/rhnop-server.nopfetchd.service
index 2783cca..efafabb 100644
--- a/debian/rhnop-server.nopsyncd.service
+++ b/debian/rhnop-server.nopfetchd.service
@@ -2,7 +2,7 @@
Description=Radio Helsinki Now Playing Daemon (Server)
[Service]
-ExecStart=/usr/bin/nopsyncd
+ExecStart=/usr/bin/nopfetchd
Restart=on-failure
PrivateTmp=yes
PrivateDevices=yes
diff --git a/debian/rules b/debian/rules
index e09f048..d82394a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,7 +6,7 @@ override_dh_auto_configure:
dh_auto_configure -- --ebuild-compat
override_dh_systemd_enable:
- dh_systemd_enable --name=nopsyncd nopsyncd.service
+ dh_systemd_enable --name=nopfetchd nopfetchd.service
dh_systemd_enable --name=nopsysstated nopsysstated.service
dh_systemd_enable --name=nopcollectd-master nopcollectd-master.service
dh_systemd_enable --name=nopcollectd-standby nopcollectd-standby.service
diff --git a/src/Makefile b/src/Makefile
index 5dce506..b478018 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -23,10 +23,10 @@ ifneq ($(MAKECMDGOALS),distclean)
include include.mk
endif
-EXECUTABLE := nopsyncd
+EXECUTABLE := nopfetchd
C_OBJS := l_pipe.o \
- nopsyncd.o
+ nopfetchd.o
C_SRCS := $(C_OBJS:%.o=%.c)
@@ -93,7 +93,7 @@ install-lib:
install-etc:
$(INSTALL) -d $(DESTDIR)$(ETCDIR)/rhnop
- $(INSTALL) -m 640 nopsyncd.conf $(DESTDIR)$(ETCDIR)/rhnop
+ $(INSTALL) -m 640 nopfetchd.conf $(DESTDIR)$(ETCDIR)/rhnop
$(INSTALL) -m 640 nopcollectd.*.conf $(DESTDIR)$(ETCDIR)/rhnop
$(INSTALL) -m 640 nopsysstated.conf $(DESTDIR)$(ETCDIR)/rhnop
diff --git a/src/configure b/src/configure
index 43df410..ccd63ac 100755
--- a/src/configure
+++ b/src/configure
@@ -237,15 +237,15 @@ EOF
cat > config.h <<EOF
/*
- * nopsyncd version info
+ * nopfetchd version info
*
* this file was created automatically
* do not edit this file directly
* use ./configure instead
*/
-#ifndef NOPSYNCD_config_h_INCLUDED
-#define NOPSYNCD_config_h_INCLUDED
+#ifndef NOPFETCHD_config_h_INCLUDED
+#define NOPFETCHD_config_h_INCLUDED
#define TARGET "$TARGET"
#define PREFIX "$PREFIX"
diff --git a/src/l_pipe.h b/src/l_pipe.h
index 0b67bf8..30803ab 100644
--- a/src/l_pipe.h
+++ b/src/l_pipe.h
@@ -19,8 +19,8 @@
* along with rhnop. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NOPSYNCD_l_pipe_h_INCLUDED
-#define NOPSYNCD_l_pipe_h_INCLUDED
+#ifndef NOPFETCHD_l_pipe_h_INCLUDED
+#define NOPFETCHD_l_pipe_h_INCLUDED
#include <lua.h>
diff --git a/src/nopcollectd b/src/nopcollectd
index d2d635c..d02e6f0 100755
--- a/src/nopcollectd
+++ b/src/nopcollectd
@@ -19,11 +19,6 @@
-- You should have received a copy of the GNU General Public License
-- along with rhnop. If not, see <http://www.gnu.org/licenses/>.
--
---
--- send now and next cart# and length to nopsyncd
--- this script should be called by the now/next macro cart
--- the arguments should be: now# nowlen next# nextlen
---
socket = require "socket"
diff --git a/src/nopsyncd.c b/src/nopfetchd.c
index c26d637..9791020 100644
--- a/src/nopsyncd.c
+++ b/src/nopfetchd.c
@@ -37,7 +37,7 @@
#define TCPSERVER DATAROOTDIR"/rhnop/tcpserver.lua"
#if LUA_VERSION_NUM > 501
-static const luaL_Reg nopsyncd_lualibs[] = {
+static const luaL_Reg nopfetchd_lualibs[] = {
{"_G", luaopen_base},
{LUA_LOADLIBNAME, luaopen_package},
{LUA_TABLIBNAME, luaopen_table},
@@ -50,7 +50,7 @@ static const luaL_Reg nopsyncd_lualibs[] = {
{NULL, NULL}
};
#else
-static const luaL_Reg nopsyncd_lualibs[] = {
+static const luaL_Reg nopfetchd_lualibs[] = {
{"", luaopen_base},
{LUA_LOADLIBNAME, luaopen_package},
{LUA_TABLIBNAME, luaopen_table},
@@ -65,7 +65,7 @@ static const luaL_Reg nopsyncd_lualibs[] = {
int init_main_loop(lua_State *L, const char* filename)
{
- const luaL_Reg *lib = nopsyncd_lualibs;
+ const luaL_Reg *lib = nopfetchd_lualibs;
#if LUA_VERSION_NUM > 501
for (; lib->func; lib++) {
@@ -164,7 +164,7 @@ void* main_loop(void* file)
int main(int argc, char* argv[])
{
- printf("starting nopsyncd...\n");
+ printf("starting nopfetchd...\n");
pthread_t qlistener, tcpserver;
@@ -191,6 +191,6 @@ int main(int argc, char* argv[])
/* pthread_join(qlistener, NULL); */
pthread_join(tcpserver, NULL);
- printf("stopping nopsyncd.\n");
+ printf("stopping nopfetchd.\n");
return 0;
}
diff --git a/src/nopsyncd.conf b/src/nopfetchd.conf
index a80d620..a80d620 100644
--- a/src/nopsyncd.conf
+++ b/src/nopfetchd.conf
diff --git a/src/noprml b/src/noprml
index f7c696a..9f9a9d1 100755
--- a/src/noprml
+++ b/src/noprml
@@ -20,7 +20,7 @@
-- along with rhnop. If not, see <http://www.gnu.org/licenses/>.
--
--
--- send now and next cart# and length to nopsyncd
+-- send now and next cart# and length to nopfetchd
-- this script should be called by the now/next macro cart
-- the arguments should be: now# nowlen next# nextlen
--
@@ -54,7 +54,7 @@ if q == nil then
end
end
--- send out message to nopsyncd
+-- send out message to nopfetchd
local result, err = mq.send(q, timestamp .. " " .. arg[1] .. " " .. arg[2] .. " " .. arg[3] .. " " .. arg[4], 0)
if result == nil then
io.stderr:write("sending message failed: " .. err .. "\n")
diff --git a/src/nopsysstated b/src/nopsysstated
index 36992f5..c8ed3bd 100755
--- a/src/nopsysstated
+++ b/src/nopsysstated
@@ -19,11 +19,6 @@
-- You should have received a copy of the GNU General Public License
-- along with rhnop. If not, see <http://www.gnu.org/licenses/>.
--
---
--- send now and next cart# and length to nopsyncd
--- this script should be called by the now/next macro cart
--- the arguments should be: now# nowlen next# nextlen
---
socket = require "socket"
diff --git a/src/playlog.lua b/src/playlog.lua
index e692154..1dea4e9 100644
--- a/src/playlog.lua
+++ b/src/playlog.lua
@@ -22,7 +22,7 @@
luasql = require "luasql.mysql"
-- CREATE DATABASE rhnop CHARACTER SET utf8 COLLATE utf8_unicode_ci;
--- GRANT select,insert,update ON rhnop.* TO 'nopsyncd' IDENTIFIED BY '<password>';
+-- GRANT select,insert,update ON rhnop.* TO 'nopfetchd' IDENTIFIED BY '<password>';
-- GRANT select ON rhnop.* TO 'nopcollectd' IDENTIFIED BY '<password>';
-- USE rhnop
-- CREATE TABLE IF NOT EXISTS now (timestamp BIGINT UNSIGNED PRIMARY KEY NOT NULL, cart INT NOT NULL, len INT, showtitle VARCHAR(255), title VARCHAR(255), artist VARCHAR(255), album VARCHAR(255), ismusic BOOLEAN);
diff --git a/src/qlistener.lua b/src/qlistener.lua
index 050dfc1..0cc2d6b 100644
--- a/src/qlistener.lua
+++ b/src/qlistener.lua
@@ -75,7 +75,7 @@ function handle_message(msg)
end
function main_loop()
- init(rhnopescdir .. "/nopsyncd.conf")
+ init(rhnopescdir .. "/nopfetchd.conf")
posix.umask("rwxrwxr-x")
local q, err = mq.create(cnf.queue_name, "ro", "rw-rw----")
diff --git a/src/tcpserver.lua b/src/tcpserver.lua
index 76c80ad..67c63fb 100644
--- a/src/tcpserver.lua
+++ b/src/tcpserver.lua
@@ -27,7 +27,7 @@ conf = require "conf"
function init_server()
local server = assert(socket.tcp())
- cnf = conf.load(rhnopescdir .. "/nopsyncd.conf")
+ cnf = conf.load(rhnopescdir .. "/nopfetchd.conf")
assert(server:setoption('reuseaddr', true))
assert(server:bind(cnf.tcp_host, cnf.tcp_port))
assert(server:listen(5))