Host files in data directory

feature/AudioLoginLogoff
Geoffrey Merck 6 years ago
parent 097b0566b1
commit c60e48ffb9

@ -3,11 +3,12 @@
# if you change these locations, make sure the sgs-xl.service file is updated! # if you change these locations, make sure the sgs-xl.service file is updated!
BINDIR=/usr/sbin BINDIR=/usr/sbin
CFGDIR=/etc/sgs-xl CFGDIR=/etc/sgs-xl
DATADIR=/etc/sgs-xl/data
# choose this if you want debugging help # choose this if you want debugging help
#CPPFLAGS=-g -ggdb -W -Wall -std=c++11 -DCFG_DIR=\"$(CFGDIR)\" #CPPFLAGS=-g -ggdb -W -Wall -std=c++11 -DCFG_DIR=\"$(CFGDIR)\"
# or, you can choose this for a much smaller executable without debugging help # or, you can choose this for a much smaller executable without debugging help
CPPFLAGS=-W -Wall -std=c++11 -DCFG_DIR=\"$(CFGDIR)\" CPPFLAGS= -g -W -Wall -std=c++11 -DCFG_DIR=\"$(CFGDIR)\" -DDATA_DIR=\"$(DATADIR)\"
SRCS = $(wildcard *.cpp) SRCS = $(wildcard *.cpp)
OBJS = $(SRCS:.cpp=.o) OBJS = $(SRCS:.cpp=.o)
@ -29,8 +30,9 @@ clean:
.PHONY: newhostfiles .PHONY: newhostfiles
newhostfiles : newhostfiles :
mkdir -p $(CFGDIR) mkdir -p $(CFGDIR)
wget -O $(CFGDIR)/DExtra_Hosts.txt http://www.pistar.uk/downloads/DExtra_Hosts.txt mkdir -p $(DATADIR)
wget -O $(CFGDIR)/DCS_Hosts.txt http://www.pistar.uk/downloads/DCS_Hosts.txt wget -O $(DATADIR)/DExtra_Hosts.txt http://www.pistar.uk/downloads/DExtra_Hosts.txt
wget -O $(DATADIR)/DCS_Hosts.txt http://www.pistar.uk/downloads/DCS_Hosts.txt
.PHONY: install .PHONY: install
install : newhostfiles sgs-xl install : newhostfiles sgs-xl
@ -51,11 +53,12 @@ uninstall :
systemctl daemon-reload systemctl daemon-reload
rm -f $(BINDIR)/sgs-xl rm -f $(BINDIR)/sgs-xl
rm -rf $(CFGDIR) rm -rf $(CFGDIR)
rm -rf $(DATADIR)
.PHONY: removehostfiles .PHONY: removehostfiles
removehostfiles : removehostfiles :
rm -f $(CFGDIR)/DExtra_Hosts.txt rm -f $(DATADIR)/DExtra_Hosts.txt
rm -f $(CFGDIR)/DCS_Hosts.txt rm -f $(DATADIR)/DCS_Hosts.txt
.PHONY: GitVersion.h .PHONY: GitVersion.h
GitVersion.h: force GitVersion.h: force

@ -435,7 +435,7 @@ void CSGSXLThread::processG2()
void CSGSXLThread::loadReflectors(const std::string fname, DSTAR_PROTOCOL dstarProtocol) void CSGSXLThread::loadReflectors(const std::string fname, DSTAR_PROTOCOL dstarProtocol)
{ {
std::string filepath(CFG_DIR); std::string filepath(DATA_DIR);
filepath += std::string("/") + fname; filepath += std::string("/") + fname;
struct stat sbuf; struct stat sbuf;

Loading…
Cancel
Save

Powered by TurnKey Linux.