hardcoded database name

pull/14/head
Tom Early 6 years ago
parent 68b36312f2
commit 5ee4a42a81

@ -195,7 +195,7 @@ uninstallbase :
/bin/rm -f $(SYSDIR)/qnlink.service
/bin/rm -f $(BINDIR)/qnlink
/bin/rm -f $(CFGDIR)/*.dat
/bin/rm -f $(CFGDIR)/RPT_STATUS.txt
/bin/rm -f $(CFGDIR)/qn.db
/bin/rm -f $(CFGDIR)/gwys.txt
/bin/rm -f $(BINDIR)/exec_?.sh

@ -54,7 +54,7 @@
#define CFG_DIR "/usr/local/etc"
#endif
const std::string GW_VERSION("QnetGateway-511");
const std::string GW_VERSION("QnetGateway-515");
static std::atomic<bool> keep_running(true);
@ -325,7 +325,6 @@ bool CQnetGateway::ReadConfig(char *cfgFile)
path.assign("dash_");
cfg.GetValue(path+"show_order", estr, DASH_SHOW_ORDER, 2, 17);
showLastHeard = (std::string::npos != DASH_SHOW_ORDER.find("LH"));
cfg.GetValue(path+"sql_filename", estr, DASH_SQL_NAME, 1, 32);
return false;
}
@ -2313,8 +2312,7 @@ bool CQnetGateway::Init(char *cfgfile)
// open database
std::string fname(CFG_DIR);
fname.append("/");
fname.append(DASH_SQL_NAME);
fname.append("/qn.db");
if (qnDB.Open(fname.c_str()))
return true;
qnDB.ClearLH();

@ -102,7 +102,7 @@ private:
std::string gate2link, link2gate, gate2modem[3], modem2gate;
std::string OWNER, owner, FILE_DTMF, FILE_ECHOTEST, IRCDDB_PASSWORD[2], FILE_QNVOICE_FILE, DASH_SQL_NAME, DASH_SHOW_ORDER;
std::string OWNER, owner, FILE_DTMF, FILE_ECHOTEST, IRCDDB_PASSWORD[2], FILE_QNVOICE_FILE, DASH_SHOW_ORDER;
bool GATEWAY_SEND_QRGS_MAP, GATEWAY_HEADER_REGEN, APRS_ENABLE, playNotInCache, showLastHeard;
bool LOG_DEBUG, LOG_IRC, LOG_DTMF, LOG_QSO, IS_HF[3];

@ -54,7 +54,7 @@
#include "QnetLink.h"
#include "Utilities.h"
#define LINK_VERSION "QnetLink-511"
#define LINK_VERSION "QnetLink-515"
#ifndef BIN_DIR
#define BIN_DIR "/usr/local/bin"
#endif
@ -539,8 +539,6 @@ bool CQnetLink::ReadConfig(const char *cfgFile)
}
cfg.GetValue(key+"priority", estr, dplus_priority);
cfg.GetValue("dash_sql_filename", estr, dash_sql_name, 2, 32);
return false;
}
@ -3288,8 +3286,7 @@ bool CQnetLink::Init(const char *cfgfile)
}
// open sqlite
std::string fname(CFG_DIR);
fname.append("/");
fname.append(dash_sql_name);
fname.append("/qn.db");
if (qnDB.Open(fname.c_str()))
return true;
qnDB.ClearLS();

@ -101,7 +101,7 @@ private:
void RptrAckThread(char *arg);
/* configuration data */
std::string login_call, owner, to_g2_external_ip, my_g2_link_ip, gwys, dash_sql_name, qnvoice_file, announce_dir;
std::string login_call, owner, to_g2_external_ip, my_g2_link_ip, gwys, qnvoice_file, announce_dir;
bool only_admin_login, only_link_unlink, qso_details, log_debug, bool_rptr_ack, announce;
bool dplus_authorize, dplus_reflectors, dplus_repeaters, dplus_priority;
unsigned short rmt_xrf_port, rmt_ref_port, rmt_dcs_port, my_g2_link_port, to_g2_external_port;

@ -216,7 +216,6 @@ timing_play_delay_d=19 # milliseconds between frames playback, if echo so
#
# Dashboard - for the php/sqlite webpage
#
dash_sql_filename_d='qn.db' # name for the sqlite database in the $CFGDIR directory
dash_refresh_d=20 # seconds for the webpage to reload
dash_lastheard_count_d=20 # maximum number of last heard entries to display
dash_show_order_d='MO,LH,SY,UR' # Show sections in this order, (not in default: IP and PS)

@ -141,9 +141,6 @@ DashboardMenu () {
echo
echo " Dashboard Menu"
echo
if [ -n "$em" ]; then
echo -n "n : Name of the database file = "; EvaluateVar dash_sql_filename{,_d}
fi
echo -n "r : Refresh time (sec) for page = "; EvaluateVar dash_refresh{,_d}
echo -n "c : Max number of last heard entries = "; EvaluateVar dash_lastheard_count{,_d}
echo -n "o : Show Section Order = "; EvaluateVar dash_show_order{,_d}
@ -160,13 +157,11 @@ DashboardMenu () {
echo " UR is the Send URCall Section"
EndMenu
if [[ "$key" == n* ]]; then dash_sql_filename="$value"
elif [[ "$key" == r* ]]; then dash_refresh="$value"
elif [[ "$key" == c* ]]; then dash_lastheard_count="$value"
elif [[ "$key" == o* ]]; then dash_show_order="${value^^}"
elif [[ "$key" == u* ]]; then
if [[ "$value" == n* ]]; then unset dash_sql_filename
elif [[ "$value" == r* ]]; then unset dash_refresh
if [[ "$value" == r* ]]; then unset dash_refresh
elif [[ "$value" == c* ]]; then unset dash_lastheard_count
elif [[ "$value" == o* ]]; then unset dash_show_order
fi
@ -696,7 +691,6 @@ WriteCFGFile () {
[ -z "${timing_play_wait+x}" ] || echo "timing_play_wait=${timing_play_wait}" >> $outFile
[ -z "${timing_play_delay+x}" ] || echo "timing_play_delay=${timing_play_delay}" >> $outFile
# dash_ section
[ -z "${dash_sql_filename+x}" ] || echo "dash_sql_filename='${dash_sql_filename}'" >> $outFile
[ -z "${dash_refresh+x}" ] || echo "dash_refresh=${dash_refresh}" >> $outFile
[ -z "${dash_lastheard_count+x}" ] || echo "dash_lastheard_count=${dash_lastheard_count}" >> $outFile
[ -z "${dash_show_order+x}" ] || echo "dash_show_order='${dash_show_order}'" >> $outFile

Loading…
Cancel
Save

Powered by TurnKey Linux.