From cdc65fa798368230c1a2ae42fab3fdbbf7d445ee Mon Sep 17 00:00:00 2001 From: Tom Early Date: Fri, 13 Apr 2018 05:43:49 -0700 Subject: [PATCH] moved .service files to subdirectory --- Makefile | 71 ++++++++++++------- QnetGateway.cpp | 2 - service.qndvap => system/qndvap.service | 0 service.qndvrptr => system/qndvrptr.service | 0 service.qngateway => system/qngateway.service | 0 service.qnlink => system/qnlink.service | 0 .../qnlinktest.service | 0 service.qnrelay => system/qnrelay.service | 0 8 files changed, 45 insertions(+), 28 deletions(-) rename service.qndvap => system/qndvap.service (100%) rename service.qndvrptr => system/qndvrptr.service (100%) rename service.qngateway => system/qngateway.service (100%) rename service.qnlink => system/qnlink.service (100%) rename service.qnlinktest => system/qnlinktest.service (100%) rename service.qnrelay => system/qnrelay.service (100%) diff --git a/Makefile b/Makefile index 11fd8f4..4ec7975 100644 --- a/Makefile +++ b/Makefile @@ -16,8 +16,11 @@ # locations for the executibles and other files are set here # NOTE: IF YOU CHANGE THESE, YOU WILL NEED TO UPDATE THE service.* FILES AND # if you change these locations, make sure the sgs.service file is updated! + BINDIR=/usr/local/bin CFGDIR=/usr/local/etc +MMPATH=../MMDVMHost +SYSDIR=/lib/systemd/system # use this if you want debugging help in the case of a crash #CPPFLAGS=-g -ggdb -W -Wall -std=c++11 -DCFG_DIR=\"$(CFGDIR)\" @@ -71,7 +74,7 @@ install : qngateway qnlink qnrelay ######### QnetGateway ######### /bin/cp -f qngateway $(BINDIR) /bin/cp -f qn.cfg $(CFGDIR) - /bin/cp -f service.qngateway /lib/systemd/system/qngateway.service + /bin/cp -f system/qngateway.service $(SYSDIR) systemctl enable qngateway.service systemctl daemon-reload systemctl start qngateway.service @@ -80,13 +83,13 @@ install : qngateway qnlink qnrelay /bin/cp -f announce/*.dat $(CFGDIR) /bin/cp -f gwys.txt $(CFGDIR) /bin/cp -f exec_?.sh $(CFGDIR) - /bin/cp -f service.qnlink /lib/systemd/system/qnlink.service + /bin/cp -f system/qnlink.service $(SYSDIR) systemctl enable qnlink.service systemctl daemon-reload systemctl start qnlink.service ######### QnetRelay ######### /bin/cp -f qnrelay $(BINDIR) - /bin/cp -f service.qnrelay /lib/systemd/system/qnrelay.service + /bin/cp -f system/qnrelay.service $(SYSDIR) systemctl enable qnrelay.service systemctl daemon-reload systemctl start qnrelay.service @@ -95,7 +98,7 @@ installdvap : qngateway qnlink qndvap ######### QnetGateway ######### /bin/cp -f qngateway $(BINDIR) /bin/cp -f qn.cfg $(CFGDIR) - /bin/cp -f service.qngateway /lib/systemd/system/qngateway.service + /bin/cp -f system/qngateway.service $(SYSDIR) systemctl enable qngateway.service systemctl daemon-reload systemctl start qngateway.service @@ -104,13 +107,13 @@ installdvap : qngateway qnlink qndvap /bin/cp -f announce/*.dat $(CFGDIR) /bin/cp -f gwys.txt $(CFGDIR) /bin/cp -f exec_?.sh $(CFGDIR) - /bin/cp -f service.qnlink /lib/systemd/system/qnlink.service + /bin/cp -f system/qnlink.service $(SYSDIR) systemctl enable qnlink.service systemctl daemon-reload systemctl start qnlink.service ######### QnetDVAP ######### /bin/cp -f qndvap $(BINDIR) - /bin/cp -f service.qndvap /lib/systemd/system/qndvap.service + /bin/cp -f system/qndvap.service $(SYSDIR) systemctl enable qndvap.service systemctl daemon-reload systemctl start qndvap.service @@ -119,7 +122,7 @@ installdvrptr : qngateway qnlink qndvrptr ######### QnetGateway ######### /bin/cp -f qngateway $(BINDIR) /bin/cp -f qn.cfg $(CFGDIR) - /bin/cp -f service.qngateway /lib/systemd/system/qngateway.service + /bin/cp -f system/qngateway.service $(SYSDIR) systemctl enable qngateway.service systemctl daemon-reload systemctl start qngateway.service @@ -128,13 +131,13 @@ installdvrptr : qngateway qnlink qndvrptr /bin/cp -f announce/*.dat $(CFGDIR) /bin/cp -f gwys.txt $(CFGDIR) /bin/cp -f exec_?.sh $(CFGDIR) - /bin/cp -f service.qnlink /lib/systemd/system/qnlink.service + /bin/cp -f system/qnlink.service $(SYSDIR) systemctl enable qnlink.service systemctl daemon-reload systemctl start qnlink.service ######### QnetDVRPTR ######### /bin/cp -f qndvrptr $(BINDIR) - /bin/cp -f service.qndvrptr /lib/systemd/system/qndvrptr.service + /bin/cp -f system/qndvrptr.service $(SYSDIR) systemctl enable qndvrptr.service systemctl daemon-reload systemctl start qndvrptr.service @@ -142,31 +145,38 @@ installdvrptr : qngateway qnlink qndvrptr installdtmfs : qnlinktest /bin/cp -f qnlinktest $(BINDIR) /bin/cp -f proc_qnlinktest $(BINDIR) - /bin/cp -f service.qnlinktest /lib/systemd/system/qnlinktest.service + /bin/cp -f system/qnlinktest.service $(SYSDIR) systemctl enable qnlinktest.service systemctl daemon-reload systemctl start qnlinktest.service -uninstalldtmfs: - systemctl stop qnlinktest.service - systemctl disable qnlinktest.service - /bin/rm -f /lib/systemd/system/qnlinktest.service - systemctl daemon-reload - /bin/rm -f $(BINDIR)/qnlinktest - /bin/rm -f $(BINDIR)/proc_qnlinktest +installmmdvm : + /bin/cp -f $(MMPATH)/MMDVMHost $(BINDIR) + /bin/cp -f $(MMPATH)/MMDVM.qn $(CFGDIR) + /bin/cp -f system/mmdvm.service $(SYSDIR) + systemctl enable mmdvm.service systemctl daemon-reload + systemctl start mmdvm.service + +uninstallmmdvm : + systemctl stop mmdvm.service + systemctl disable mmdvm.service + /bin/rm -f $(SYSDIR)/mmdvm.service + /bin/rm -f $(BINDIR)/MMDVMHost + /bin/rm -f $(CFGDIR)/MMDVM.qn + sudo systemctl daemon-reload uninstall : ######### QnetGateway ######### systemctl stop qngateway.service systemctl disable qngateway.service - /bin/rm -f /lib/systemd/system/qngateway.service + /bin/rm -f $(SYSDIR)/qngateway.service /bin/rm -f $(BINDIR)/qngateway /bin/rm -f $(CFGDIR)/qn.cfg ######### QnetLink ######### systemctl stop qnlink.service systemctl disable qnlink.service - /bin/rm -f /lib/systemd/system/qnlink.service + /bin/rm -f $(SYSDIR)/qnlink.service /bin/rm -f $(BINDIR)/qnlink /bin/rm -f $(CFGDIR)/already_linked.dat /bin/rm -f $(CFGDIR)/already_unlinked.dat @@ -180,7 +190,7 @@ uninstall : ######### QnetRelay ######### systemctl stop qnrelay.service systemctl disable qnrelay.service - /bin/rm -f /lib/systemd/system/qnrelay.service + /bin/rm -f $(SYSDIR)/qnrelay.service /bin/rm -f $(BINDIR)/qnrelay systemctl daemon-reload @@ -188,13 +198,13 @@ uninstalldvap : ######### QnetGateway ######### systemctl stop qngateway.service systemctl disable qngateway.service - /bin/rm -f /lib/systemd/system/qngateway.service + /bin/rm -f $(SYSDIR)/qngateway.service /bin/rm -f $(BINDIR)/qngateway /bin/rm -f $(CFGDIR)/qn.cfg ######### QnetLink ######### systemctl stop qnlink.service systemctl disable qnlink.service - /bin/rm -f /lib/systemd/system/qnlink.service + /bin/rm -f $(SYSDIR)/qnlink.service /bin/rm -f $(BINDIR)/qnlink /bin/rm -f $(CFGDIR)/already_linked.dat /bin/rm -f $(CFGDIR)/already_unlinked.dat @@ -208,7 +218,7 @@ uninstalldvap : ######### QnetDVAP ######### systemctl stop qndvap.service systemctl disable qndvap.service - /bin/rm -f /lib/systemd/system/qndvap.service + /bin/rm -f $(SYSDIR)/qndvap.service /bin/rm -f $(BINDIR)/qndvap systemctl daemon-reload @@ -216,13 +226,13 @@ uninstalldvrptr : ######### QnetGateway ######### systemctl stop qngateway.service systemctl disable qngateway.service - /bin/rm -f /lib/systemd/system/qngateway.service + /bin/rm -f $(SYSDIR)/qngateway.service /bin/rm -f $(BINDIR)/qngateway /bin/rm -f $(CFGDIR)/qn.cfg ######### QnetLink ######### systemctl stop qnlink.service systemctl disable qnlink.service - /bin/rm -f /lib/systemd/system/qnlink.service + /bin/rm -f $(SYSDIR)/qnlink.service /bin/rm -f $(BINDIR)/qnlink /bin/rm -f $(CFGDIR)/already_linked.dat /bin/rm -f $(CFGDIR)/already_unlinked.dat @@ -236,6 +246,15 @@ uninstalldvrptr : ######### QnetDVRPTR ######### systemctl stop qndvrptr.service systemctl disable qndvrptr.service - /bin/rm -f /lib/systemd/system/qndvrptr.service + /bin/rm -f $(SYSDIR)/qndvrptr.service /bin/rm -f $(BINDIR)/qndvrptr systemctl daemon-reload + +uninstalldtmfs: + systemctl stop qnlinktest.service + systemctl disable qnlinktest.service + /bin/rm -f $(SYSDIR)/qnlinktest.service + systemctl daemon-reload + /bin/rm -f $(BINDIR)/qnlinktest + /bin/rm -f $(BINDIR)/proc_qnlinktest + systemctl daemon-reload diff --git a/QnetGateway.cpp b/QnetGateway.cpp index eecc9d3..2f16e04 100644 --- a/QnetGateway.cpp +++ b/QnetGateway.cpp @@ -982,8 +982,6 @@ void CQnetGateway::process() (rptrbuf.remaining == 0x13) || /* 19 bytes follow */ (rptrbuf.remaining == 0x16)) ) { /* 22 bytes follow */ - printf("Got viable packet of len=%d on port %u\n", recvlen, ntohs(fromRptr.sin_port)); - int dtmf_buf_count[3] = {0, 0, 0}; char dtmf_buf[3][MAX_DTMF_BUF + 1] = { {""}, {""}, {""} }; int dtmf_last_frame[3] = { 0, 0, 0 }; diff --git a/service.qndvap b/system/qndvap.service similarity index 100% rename from service.qndvap rename to system/qndvap.service diff --git a/service.qndvrptr b/system/qndvrptr.service similarity index 100% rename from service.qndvrptr rename to system/qndvrptr.service diff --git a/service.qngateway b/system/qngateway.service similarity index 100% rename from service.qngateway rename to system/qngateway.service diff --git a/service.qnlink b/system/qnlink.service similarity index 100% rename from service.qnlink rename to system/qnlink.service diff --git a/service.qnlinktest b/system/qnlinktest.service similarity index 100% rename from service.qnlinktest rename to system/qnlinktest.service diff --git a/service.qnrelay b/system/qnrelay.service similarity index 100% rename from service.qnrelay rename to system/qnrelay.service