diff --git a/acinclude.m4 b/acinclude.m4 index 77e78ccd9..54ff20249 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -255,6 +255,9 @@ fi TUXBOX_APPS_DIRECTORY_ONE(configdir, CONFIGDIR, localstatedir, /var, /tuxbox/config, [--with-configdir=PATH], [where to find config files]) +TUXBOX_APPS_DIRECTORY_ONE(zapitdir, ZAPITDIR, localstatedir, /var, /tuxbox/config/zapit, + [--with-zapitdir=PATH], [where to find zapit files]) + TUXBOX_APPS_DIRECTORY_ONE(datadir, DATADIR, datadir, /share, /tuxbox, [--with-datadir=PATH], [where to find data files]) @@ -345,6 +348,7 @@ TUXBOX_APPS_DIRECTORY_ONE(flagdir, FLAGDIR, localstatedir, /var, /etc, dnl automake <= 1.6 needs this specifications AC_SUBST(CONFIGDIR) +AC_SUBST(ZAPITDIR) AC_SUBST(DATADIR) AC_SUBST(DATADIR_VAR) AC_SUBST(CONTROLDIR) diff --git a/data/config/settingsupdate.conf.in b/data/config/settingsupdate.conf.in index dc12fe71a..53a7fc935 100644 --- a/data/config/settingsupdate.conf.in +++ b/data/config/settingsupdate.conf.in @@ -44,13 +44,14 @@ @CONFIGDIR@/satellites.xml @CONFIGDIR@/tuxcal/ @CONFIGDIR@/tuxmail/ -@CONFIGDIR@/zapit/ @CONFIGDIR@/oscam.* @CONFIGDIR@/oscammon.conf @CONFIGDIR@/scan.conf @CONFIGDIR@/srv.conf @CONFIGDIR@/flex/flex_eigene_scripte.conf +@ZAPITDIR@/ + @FLAGDIR@/ /var/bin/ diff --git a/data/scripts/backup.sh.in b/data/scripts/backup.sh.in index 64a4a14bc..1b3079cd4 100644 --- a/data/scripts/backup.sh.in +++ b/data/scripts/backup.sh.in @@ -30,7 +30,8 @@ TOBACKUP="\ @CONFIGDIR@/tuxwetter/tuxwetter.conf \ @CONFIGDIR@/tuxwetter/tuxwetter.mcfg \ @CONFIGDIR@/Y-Web.conf \ - @CONFIGDIR@/zapit/ \ + \ + @ZAPITDIR@/ \ \ @FLAGDIR@/ \ \ diff --git a/data/scripts/migration.sh.in b/data/scripts/migration.sh.in index a7059e19c..5f3e487c1 100644 --- a/data/scripts/migration.sh.in +++ b/data/scripts/migration.sh.in @@ -30,7 +30,7 @@ fi if [ -e zapit/frontend.conf ]; then # uni_qrg was renamed to uni_freq - sed -i "s|_uni_qrg=|_uni_freq=|g" @CONFIGDIR@/zapit/frontend.conf + sed -i "s|_uni_qrg=|_uni_freq=|g" @ZAPITDIR@/frontend.conf fi controlscripts="\ diff --git a/data/y-web/Makefile.am b/data/y-web/Makefile.am index 012f726cd..2d2134b3e 100644 --- a/data/y-web/Makefile.am +++ b/data/y-web/Makefile.am @@ -129,6 +129,7 @@ install-data-hook: find $(DESTDIR)$(PRIVATE_HTTPDDIR)/ -type f -print0 | xargs --no-run-if-empty -0 \ sed -i \ -e 's|%(CONFIGDIR)|$(CONFIGDIR)|g' \ + -e 's|%(ZAPITDIR)|$(ZAPITDIR)|g' \ -e 's|%(DATADIR)|$(DATADIR)|g' \ -e 's|%(DATADIR_VAR)|$(DATADIR_VAR)|g' \ -e 's|%(CONTROLDIR)|$(CONTROLDIR)|g' \ diff --git a/data/y-web/Y_Settings_zapit.yhtm b/data/y-web/Y_Settings_zapit.yhtm index 88dad89f3..90778c344 100644 --- a/data/y-web/Y_Settings_zapit.yhtm +++ b/data/y-web/Y_Settings_zapit.yhtm @@ -43,10 +43,10 @@ function do_submit() - bouquets.xml
- services.xml
- ubouquets.xml
- myservices.xml
+ bouquets.xml
+ services.xml
+ ubouquets.xml
+ myservices.xml
diff --git a/data/y-web/Y_neutrino_Blocks.txt b/data/y-web/Y_neutrino_Blocks.txt index 56acb7d80..6fbead163 100644 --- a/data/y-web/Y_neutrino_Blocks.txt +++ b/data/y-web/Y_neutrino_Blocks.txt @@ -639,11 +639,11 @@ start-block~neutrino_form-data_diverse TV-Startkanal - + Radio-Startkanal - + Audio-PIDs speichern @@ -739,9 +739,9 @@ function form_init() obj_set_radio_value('filebrowser_showrights', "{=ini-get:%(CONFIGDIR)/neutrino.conf;filebrowser_showrights;1~cache=}"); obj_set_radio_value('filebrowser_denydirectoryleave', "{=ini-get:%(CONFIGDIR)/neutrino.conf;filebrowser_denydirectoryleave;false~cache=}"); //zapit - obj_set_radio_value('save_lastchannel', "{=ini-get:%(CONFIGDIR)/zapit/zapit.conf;saveLastChannel;true~open=}"); - obj_set_radio_value('save_audio_pids', "{=ini-get:%(CONFIGDIR)/zapit/zapit.conf;saveAudioPIDs;false~cache=}"); - obj_set_radio_value('bouquet_others', "{=ini-get:%(CONFIGDIR)/zapit/zapit.conf;makeRemainingChannelsBouquet;true~cache=}"); + obj_set_radio_value('save_lastchannel', "{=ini-get:%(ZAPITDIR)/zapit.conf;saveLastChannel;true~open=}"); + obj_set_radio_value('save_audio_pids', "{=ini-get:%(ZAPITDIR)/zapit.conf;saveAudioPIDs;false~cache=}"); + obj_set_radio_value('bouquet_others', "{=ini-get:%(ZAPITDIR)/zapit.conf;makeRemainingChannelsBouquet;true~cache=}"); change_lastchannel(); } @@ -782,11 +782,11 @@ start-block~neutrino_diverse_save_settings {=ini-set:%(CONFIGDIR)/neutrino.conf;tuxtxt_cache;{=tuxtxt_cache=}~cache=} {=ini-set:%(CONFIGDIR)/neutrino.conf;virtual_zap_mode;{=virtual_zap_mode=}~cache=} {=ini-set:%(CONFIGDIR)/neutrino.conf;volumebar_disp_pos;{=volumebar_disp_pos=}~save=} -{=ini-set:%(CONFIGDIR)/zapit/zapit.conf;saveAudioPIDs;{=save_audio_pids=}~open=} -{=ini-set:%(CONFIGDIR)/zapit/zapit.conf;saveLastChannel;{=save_lastchannel=}~cache=} -{=ini-set:%(CONFIGDIR)/zapit/zapit.conf;startChannelRadio;{=startchannel_radio=}~cache=} -{=ini-set:%(CONFIGDIR)/zapit/zapit.conf;startChannelTV;{=startchannel_tv=}~cache=} -{=ini-set:%(CONFIGDIR)/zapit/zapit.conf;makeRemainingChannelsBouquet;{=bouquet_others=}~save=} +{=ini-set:%(ZAPITDIR)/zapit.conf;saveAudioPIDs;{=save_audio_pids=}~open=} +{=ini-set:%(ZAPITDIR)/zapit.conf;saveLastChannel;{=save_lastchannel=}~cache=} +{=ini-set:%(ZAPITDIR)/zapit.conf;startChannelRadio;{=startchannel_radio=}~cache=} +{=ini-set:%(ZAPITDIR)/zapit.conf;startChannelTV;{=startchannel_tv=}~cache=} +{=ini-set:%(ZAPITDIR)/zapit.conf;makeRemainingChannelsBouquet;{=bouquet_others=}~save=} end-block~neutrino_diverse_save_settings # ------- Neutrino form-data: pictureviewer ------------------------------- diff --git a/data/y-web/scripts/_Y_Globals.sh b/data/y-web/scripts/_Y_Globals.sh index 4fe150b04..99a28e0bc 100644 --- a/data/y-web/scripts/_Y_Globals.sh +++ b/data/y-web/scripts/_Y_Globals.sh @@ -23,7 +23,7 @@ y_path_sbin="/sbin" y_path_usrsbin="/usr/sbin" y_path_config="%(CONFIGDIR)" y_path_tmp="/tmp" -y_path_zapit="$y_path_config/zapit" +y_path_zapit="%(ZAPITDIR)" y_path_plugin_tuxnew="$y_path_config/tuxnews" diff --git a/data/zapit/Makefile.am b/data/zapit/Makefile.am index 81b16dd8a..7f2f7d1de 100644 --- a/data/zapit/Makefile.am +++ b/data/zapit/Makefile.am @@ -1,8 +1,8 @@ -installdir = $(CONFIGDIR)/zapit +installdir = $(ZAPITDIR) install_DATA = \ myservices.xml \ epgmap.xml #install-data-hook: -# $(INSTALL) -d $(DESTDIR)/$(CONFIGDIR)/zapit +# $(INSTALL) -d $(DESTDIR)/$(ZAPITDIR) diff --git a/src/eitd/xmlutil.cpp b/src/eitd/xmlutil.cpp index fa2c90c98..aa009b92d 100644 --- a/src/eitd/xmlutil.cpp +++ b/src/eitd/xmlutil.cpp @@ -53,8 +53,8 @@ extern pthread_rwlock_t eventsLock; extern bool dvb_time_update; extern CBouquetManager *g_bouquetManager; -std::string epg_filter_dir = CONFIGDIR "/zapit/epgfilter.xml"; -std::string dvbtime_filter_dir = CONFIGDIR "/zapit/dvbtimefilter.xml"; +std::string epg_filter_dir = ZAPITDIR "/epgfilter.xml"; +std::string dvbtime_filter_dir = ZAPITDIR "/dvbtimefilter.xml"; bool epg_filter_is_whitelist = false; bool epg_filter_except_current_next = false; diff --git a/src/gui/lua/luainstance.cpp b/src/gui/lua/luainstance.cpp index e41fcd450..dbf692d99 100644 --- a/src/gui/lua/luainstance.cpp +++ b/src/gui/lua/luainstance.cpp @@ -426,6 +426,7 @@ static void set_lua_variables(lua_State *L) table_key_s directories[] = { { "CONFIGDIR", CONFIGDIR }, + { "ZAPITDIR", ZAPITDIR }, { "DATADIR", DATADIR }, { "DATADIR_VAR", DATADIR_VAR }, { "CONTROLDIR", CONTROLDIR }, diff --git a/src/gui/start_wizard.cpp b/src/gui/start_wizard.cpp index aab9c9952..0af8ceffb 100644 --- a/src/gui/start_wizard.cpp +++ b/src/gui/start_wizard.cpp @@ -167,7 +167,7 @@ int CStartUpWizard::exec(CMenuTarget* parent, const string & /*actionKey*/) { if (ShowMsg(LOCALE_WIZARD_INITIAL_SETTINGS, g_Locale->getText(LOCALE_WIZARD_INSTALL_SETTINGS), CMsgBox::mbrYes, CMsgBox::mbYes | CMsgBox::mbNo, NULL, 450, 30) == CMsgBox::mbrYes) { - system("/bin/cp " CONFIGDIR "/initial/* " CONFIGDIR "/zapit/"); + system("/bin/cp " CONFIGDIR "/initial/* " ZAPITDIR); CFEManager::getInstance()->loadSettings(); CFEManager::getInstance()->saveSettings(); CZapit::getInstance()->PrepareChannels(); diff --git a/src/nhttpd/tuxboxapi/controlapi.cpp b/src/nhttpd/tuxboxapi/controlapi.cpp index a42cbc960..504497b42 100644 --- a/src/nhttpd/tuxboxapi/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/controlapi.cpp @@ -677,21 +677,21 @@ void CControlAPI::GetTimeCGI(CyhookHandler *hh) // send services.xml void CControlAPI::GetServicesxmlCGI(CyhookHandler *hh) { - hh->SendFile(CONFIGDIR "/zapit/services.xml"); + hh->SendFile(ZAPITDIR "/services.xml"); } //----------------------------------------------------------------------------- // send bouquets.xml void CControlAPI::GetBouquetsxmlCGI(CyhookHandler *hh) { - hh->SendFile(CONFIGDIR "/zapit/bouquets.xml"); + hh->SendFile(ZAPITDIR "/bouquets.xml"); } //----------------------------------------------------------------------------- // send ubouquets.xml void CControlAPI::GetUBouquetsxmlCGI(CyhookHandler *hh) { - hh->SendFile(CONFIGDIR "/zapit/ubouquets.xml"); + hh->SendFile(ZAPITDIR "/ubouquets.xml"); } //------------------------------------------------------------------------- diff --git a/src/nhttpd/yconfig.h b/src/nhttpd/yconfig.h index 5f6a5122a..d00e2ec20 100644 --- a/src/nhttpd/yconfig.h +++ b/src/nhttpd/yconfig.h @@ -117,7 +117,7 @@ #define EXTRASDOCUMENTROOT HOSTED_HTTPDDIR"/extras" #define EXTRASDOCUMENTURL "/hosted/extras" -#define ZAPITXMLPATH CONFIGDIR"/zapit" +#define ZAPITXMLPATH ZAPITDIR #define TUXBOX_LOGOS_URL LOGODIR #define SSL_PEMFILE HTTPD_CONFIGDIR "/server.pem" diff --git a/src/nhttpd/yhttpd_mods/mod_yparser.cpp b/src/nhttpd/yhttpd_mods/mod_yparser.cpp index 4e78c55e6..f0aa619a8 100644 --- a/src/nhttpd/yhttpd_mods/mod_yparser.cpp +++ b/src/nhttpd/yhttpd_mods/mod_yparser.cpp @@ -455,6 +455,7 @@ std::string CyParser::YWeb_cgi_cmd(CyhookHandler *hh, std::string ycmd) { yresult = this->YWeb_cgi_func(hh, ycmd_name); else if (ycmd_type == "define-get") { if (ycmd_name.compare("CONFIGDIR")) yresult = CONFIGDIR; + else if (ycmd_name.compare("ZAPITDIR")) yresult = ZAPITDIR; else if (ycmd_name.compare("DATADIR")) yresult = DATADIR; else if (ycmd_name.compare("DATADIR_VAR")) yresult = DATADIR_VAR; else if (ycmd_name.compare("CONTROLDIR")) yresult = CONTROLDIR; diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp index 9685fa1eb..5429a544f 100644 --- a/src/system/setting_helpers.cpp +++ b/src/system/setting_helpers.cpp @@ -660,7 +660,7 @@ int CDataResetNotifier::exec(CMenuTarget* /*parent*/, const std::string& actionK } if(delete_all) { - my_system(3, "/bin/sh", "-c", "rm -f " CONFIGDIR "/zapit/*.conf"); + my_system(3, "/bin/sh", "-c", "rm -f " ZAPITDIR "/*.conf"); CServiceManager::getInstance()->SatelliteList().clear(); CZapit::getInstance()->LoadSettings(); CZapit::getInstance()->GetConfig(zapitCfg); @@ -686,7 +686,7 @@ int CDataResetNotifier::exec(CMenuTarget* /*parent*/, const std::string& actionK CFrameBuffer::getInstance()->Clear(); } if(delete_chan) { - my_system(3, "/bin/sh", "-c", "rm -f " CONFIGDIR "/zapit/*.xml"); + my_system(3, "/bin/sh", "-c", "rm -f " ZAPITDIR "/*.xml"); g_Zapit->reinitChannels(); } if (delete_removed) { diff --git a/src/zapit/include/zapit/femanager.h b/src/zapit/include/zapit/femanager.h index 2769142a0..4356dd4d2 100644 --- a/src/zapit/include/zapit/femanager.h +++ b/src/zapit/include/zapit/femanager.h @@ -46,7 +46,7 @@ //#define DYNAMIC_DEMUX //#define MAKE_FE_KEY(adapter, number) ((adapter << 8) | (number & 0xFF)) -#define FECONFIGFILE CONFIGDIR "/zapit/frontend.conf" +#define FECONFIGFILE ZAPITDIR "/frontend.conf" typedef std::map fe_map_t; typedef fe_map_t::iterator fe_map_iterator_t; diff --git a/src/zapit/include/zapit/settings.h b/src/zapit/include/zapit/settings.h index 7d90a9a2a..89b0fd0bb 100644 --- a/src/zapit/include/zapit/settings.h +++ b/src/zapit/include/zapit/settings.h @@ -31,17 +31,17 @@ #define CONFIGDIR "/var/tuxbox/config" #endif -#define ZAPITCONFIGFILE CONFIGDIR "/zapit/zapit.conf" -#define SERVICES_XML CONFIGDIR "/zapit/services.xml" +#define ZAPITCONFIGFILE ZAPITDIR "/zapit.conf" +#define SERVICES_XML ZAPITDIR "/services.xml" #define SERVICES_TMP "/tmp/services.tmp" -#define BOUQUETS_XML CONFIGDIR "/zapit/bouquets.xml" -#define UBOUQUETS_XML CONFIGDIR "/zapit/ubouquets.xml" +#define BOUQUETS_XML ZAPITDIR "/bouquets.xml" +#define UBOUQUETS_XML ZAPITDIR "/ubouquets.xml" #define BOUQUETS_TMP "/tmp/bouquets.tmp" #define CURRENTSERVICES_XML "/tmp/currentservices.xml" #define CURRENTSERVICES_TMP "/tmp/currentservices.tmp" -#define MYSERVICES_XML CONFIGDIR "/zapit/myservices.xml" +#define MYSERVICES_XML ZAPITDIR "/myservices.xml" #define CABLES_XML CONFIGDIR "/cables.xml" #define SATELLITES_XML CONFIGDIR "/satellites.xml" diff --git a/src/zapit/include/zapit/zapit.h b/src/zapit/include/zapit/zapit.h index 6a5eb2d49..d8fa70746 100644 --- a/src/zapit/include/zapit/zapit.h +++ b/src/zapit/include/zapit/zapit.h @@ -25,8 +25,8 @@ #define PAL 0 #define NTSC 1 -#define AUDIO_CONFIG_FILE CONFIGDIR "/zapit/audio.conf" -#define VOLUME_CONFIG_FILE CONFIGDIR "/zapit/volume.conf" +#define AUDIO_CONFIG_FILE ZAPITDIR "/audio.conf" +#define VOLUME_CONFIG_FILE ZAPITDIR "/volume.conf" typedef std::map audio_map_t; typedef audio_map_t::iterator audio_map_iterator_t; diff --git a/src/zapit/src/bouquets.cpp b/src/zapit/src/bouquets.cpp index e4cc82717..ac56a5ca6 100644 --- a/src/zapit/src/bouquets.cpp +++ b/src/zapit/src/bouquets.cpp @@ -1405,7 +1405,7 @@ void CBouquetManager::readEPGMapping() EpgXMLMapping.clear(); std::list epgmap_dirs; - epgmap_dirs.push_back(CONFIGDIR "/zapit"); + epgmap_dirs.push_back(ZAPITDIR); epgmap_dirs.push_back(WEBTVDIR); epgmap_dirs.push_back(WEBTVDIR_VAR);