diff --git a/python_apps/pypo/airtime-liquidsoap-init-d b/python_apps/pypo/install/airtime-liquidsoap-init-d similarity index 100% rename from python_apps/pypo/airtime-liquidsoap-init-d rename to python_apps/pypo/install/airtime-liquidsoap-init-d diff --git a/python_apps/pypo/airtime-playout-init-d b/python_apps/pypo/install/airtime-playout-init-d similarity index 100% rename from python_apps/pypo/airtime-playout-init-d rename to python_apps/pypo/install/airtime-playout-init-d diff --git a/python_apps/pypo/monit-airtime-liquidsoap.cfg b/python_apps/pypo/install/monit-airtime-liquidsoap.cfg similarity index 100% rename from python_apps/pypo/monit-airtime-liquidsoap.cfg rename to python_apps/pypo/install/monit-airtime-liquidsoap.cfg diff --git a/python_apps/pypo/monit-airtime-playout.cfg b/python_apps/pypo/install/monit-airtime-playout.cfg similarity index 100% rename from python_apps/pypo/monit-airtime-playout.cfg rename to python_apps/pypo/install/monit-airtime-playout.cfg diff --git a/python_apps/pypo/monit-pre530-airtime-liquidsoap.cfg b/python_apps/pypo/install/monit-pre530-airtime-liquidsoap.cfg similarity index 100% rename from python_apps/pypo/monit-pre530-airtime-liquidsoap.cfg rename to python_apps/pypo/install/monit-pre530-airtime-liquidsoap.cfg diff --git a/python_apps/pypo/install/pypo-copy-files.py b/python_apps/pypo/install/pypo-copy-files.py index f3e1a428d..9aa7f6ffb 100644 --- a/python_apps/pypo/install/pypo-copy-files.py +++ b/python_apps/pypo/install/pypo-copy-files.py @@ -68,7 +68,7 @@ try: current_script_dir = get_current_script_dir() if not os.path.exists(PATH_INI_FILE): - shutil.copy('%s/../pypo.cfg'%current_script_dir, PATH_INI_FILE) + shutil.copy('%s/pypo.cfg'%current_script_dir, PATH_INI_FILE) try: os.remove("/etc/airtime/liquidsoap.cfg") @@ -95,13 +95,13 @@ try: monit_version = get_monit_version() if version_compare(monit_version, "5.3.0") >= 0: - shutil.copy('%s/../monit-airtime-liquidsoap.cfg' % current_script_dir, \ + shutil.copy('%s/monit-airtime-liquidsoap.cfg' % current_script_dir, \ '/etc/monit/conf.d/monit-airtime-liquidsoap.cfg') else: - shutil.copy('%s/../monit-pre530-airtime-liquidsoap.cfg' % current_script_dir, \ + shutil.copy('%s/monit-pre530-airtime-liquidsoap.cfg' % current_script_dir, \ '/etc/monit/conf.d/monit-airtime-liquidsoap.cfg') - shutil.copy('%s/../monit-airtime-playout.cfg'%current_script_dir, '/etc/monit/conf.d/') + shutil.copy('%s/monit-airtime-playout.cfg'%current_script_dir, '/etc/monit/conf.d/') #create pypo log dir create_dir(config['pypo_log_dir']) @@ -132,8 +132,8 @@ try: os.system("chown -R pypo:pypo "+config["base_recorded_files"]) #copy init.d script - shutil.copy(config["bin_dir"]+"/bin/airtime-playout-init-d", "/etc/init.d/airtime-playout") - shutil.copy(config["bin_dir"]+"/bin/airtime-liquidsoap-init-d", "/etc/init.d/airtime-liquidsoap") + shutil.copy(config["bin_dir"]+"/bin/install/airtime-playout-init-d", "/etc/init.d/airtime-playout") + shutil.copy(config["bin_dir"]+"/bin/install/airtime-liquidsoap-init-d", "/etc/init.d/airtime-liquidsoap") #copy log rotate script shutil.copy(config["bin_dir"]+"/bin/liquidsoap_scripts/airtime-liquidsoap.logrotate", "/etc/logrotate.d/airtime-liquidsoap") diff --git a/python_apps/pypo/pypo.cfg b/python_apps/pypo/install/pypo.cfg similarity index 100% rename from python_apps/pypo/pypo.cfg rename to python_apps/pypo/install/pypo.cfg diff --git a/python_apps/pypo/pypocli.py b/python_apps/pypo/pypocli.py index 42d3205b4..89b3f091a 100644 --- a/python_apps/pypo/pypocli.py +++ b/python_apps/pypo/pypocli.py @@ -18,13 +18,13 @@ import re from Queue import Queue from threading import Lock -from pypopush import PypoPush -from pypofetch import PypoFetch -from pypofile import PypoFile -from recorder import Recorder -from listenerstat import ListenerStat +from schedule.pypopush import PypoPush +from schedule.pypofetch import PypoFetch +from schedule.pypofile import PypoFile +from recorder.recorder import Recorder +from schedule.listenerstat import ListenerStat from pypomessagehandler import PypoMessageHandler -from pypoliquidsoap import PypoLiquidsoap +from schedule.pypoliquidsoap import PypoLiquidsoap from media.update.replaygainupdater import ReplayGainUpdater from media.update.silananalyzer import SilanAnalyzer diff --git a/python_apps/pypo/recorder/__init__.py b/python_apps/pypo/recorder/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/python_apps/pypo/recorder.py b/python_apps/pypo/recorder/recorder.py similarity index 100% rename from python_apps/pypo/recorder.py rename to python_apps/pypo/recorder/recorder.py diff --git a/python_apps/pypo/schedule/__init__.py b/python_apps/pypo/schedule/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/python_apps/pypo/eventtypes.py b/python_apps/pypo/schedule/eventtypes.py similarity index 100% rename from python_apps/pypo/eventtypes.py rename to python_apps/pypo/schedule/eventtypes.py diff --git a/python_apps/pypo/listenerstat.py b/python_apps/pypo/schedule/listenerstat.py similarity index 100% rename from python_apps/pypo/listenerstat.py rename to python_apps/pypo/schedule/listenerstat.py diff --git a/python_apps/pypo/pypofetch.py b/python_apps/pypo/schedule/pypofetch.py similarity index 99% rename from python_apps/pypo/pypofetch.py rename to python_apps/pypo/schedule/pypofetch.py index 22455c505..8aae00ecc 100644 --- a/python_apps/pypo/pypofetch.py +++ b/python_apps/pypo/schedule/pypofetch.py @@ -22,7 +22,7 @@ from std_err_override import LogWriter # configure logging -logging_cfg = os.path.join(os.path.dirname(__file__), "logging.cfg") +logging_cfg = os.path.join(os.path.dirname(__file__), "../logging.cfg") logging.config.fileConfig(logging_cfg) logger = logging.getLogger() LogWriter.override_std_err(logger) diff --git a/python_apps/pypo/pypofile.py b/python_apps/pypo/schedule/pypofile.py similarity index 97% rename from python_apps/pypo/pypofile.py rename to python_apps/pypo/schedule/pypofile.py index aaee3c34f..0c8c168be 100644 --- a/python_apps/pypo/pypofile.py +++ b/python_apps/pypo/schedule/pypofile.py @@ -12,7 +12,8 @@ import stat from std_err_override import LogWriter # configure logging -logging.config.fileConfig("logging.cfg") +logging_cfg = os.path.join(os.path.dirname(__file__), "../logging.cfg") +logging.config.fileConfig(logging_cfg) logger = logging.getLogger() LogWriter.override_std_err(logger) diff --git a/python_apps/pypo/pypoliqqueue.py b/python_apps/pypo/schedule/pypoliqqueue.py similarity index 100% rename from python_apps/pypo/pypoliqqueue.py rename to python_apps/pypo/schedule/pypoliqqueue.py diff --git a/python_apps/pypo/pypoliquidsoap.py b/python_apps/pypo/schedule/pypoliquidsoap.py similarity index 100% rename from python_apps/pypo/pypoliquidsoap.py rename to python_apps/pypo/schedule/pypoliquidsoap.py diff --git a/python_apps/pypo/pypopush.py b/python_apps/pypo/schedule/pypopush.py similarity index 98% rename from python_apps/pypo/pypopush.py rename to python_apps/pypo/schedule/pypopush.py index d032ac3c6..a93fd489b 100644 --- a/python_apps/pypo/pypopush.py +++ b/python_apps/pypo/schedule/pypopush.py @@ -25,7 +25,7 @@ from configobj import ConfigObj # configure logging -logging_cfg = os.path.join(os.path.dirname(__file__), "logging.cfg") +logging_cfg = os.path.join(os.path.dirname(__file__), "../logging.cfg") logging.config.fileConfig(logging_cfg) logger = logging.getLogger() LogWriter.override_std_err(logger) diff --git a/python_apps/pypo/telnetliquidsoap.py b/python_apps/pypo/schedule/telnetliquidsoap.py similarity index 100% rename from python_apps/pypo/telnetliquidsoap.py rename to python_apps/pypo/schedule/telnetliquidsoap.py diff --git a/python_apps/pypo/testpypoliqqueue.py b/python_apps/pypo/tests/testpypoliqqueue.py similarity index 100% rename from python_apps/pypo/testpypoliqqueue.py rename to python_apps/pypo/tests/testpypoliqqueue.py