diff --git a/bin/cosmicpi-postinstall b/bin/cosmicpi-postinstall index e03fc6f..e06ee95 100755 --- a/bin/cosmicpi-postinstall +++ b/bin/cosmicpi-postinstall @@ -25,5 +25,5 @@ echo "--- and placed in the public domain. For license details see: echo "--- https://creativecommons.org/share-your-work/public-domain/cc0/ ---" -sleep 60 -sudo reboot now +# sleep 60 +# sudo reboot now diff --git a/cosmicpi/config.py b/cosmicpi/config.py index ac4071c..7df00ce 100644 --- a/cosmicpi/config.py +++ b/cosmicpi/config.py @@ -4,11 +4,11 @@ import cosmicpi.storage Config = configparser.ConfigParser() -Config.read(['install_files/cosmicpi.config', '/etc/cosmicpi.conf']) +Config.read(['/etc/cosmicpi.config', 'data_files/cosmicpi.config']) # Set SQLite database path if not exist in config if not Config.has_option('Storage', 'sqlite_location'): storage_path = os.path.abspath(cosmicpi.storage.__file__) - sqlite_path = os.path.join(os.path.dirname(storage_path), 'sqlite_db') + sqlite_path = os.path.join(os.path.dirname(storage_path), 'cosmicpi.sqlite3') Config.set('Storage', 'sqlite_location', sqlite_path) diff --git a/cosmicpi/storage/sqlite_db b/cosmicpi/storage/cosmicpi.sqlite3 similarity index 100% rename from cosmicpi/storage/sqlite_db rename to cosmicpi/storage/cosmicpi.sqlite3 diff --git a/data_files/cosmicpi.config b/data_files/cosmicpi.config index 7cd31a4..e07729f 100644 --- a/data_files/cosmicpi.config +++ b/data_files/cosmicpi.config @@ -12,6 +12,7 @@ enable_raw_output = False [Storage] # tells the cleanup script how old the oldest event is allowed to be; measured in hours sqlite_max_event_age = 13 +# sqlite_location = /usr/share/cosmicpi.sqlite [MQTT] broker_address = cosmicpidata.mooo.com @@ -30,5 +31,4 @@ name=SomeWiFi password= [MISC] -#wpa_supplicant_location = C:\Users\Hendrik\Dropbox\active_sync_storage\Dokumente\CERN\2017\PyCharm\cosmicpi-rpi\some_file_location wpa_supplicant_location = /etc/wpa_supplicant/wpa_supplicant.conf diff --git a/setup.py b/setup.py index 2a8f209..51a7292 100644 --- a/setup.py +++ b/setup.py @@ -6,14 +6,14 @@ import os class PostInstall(install): def run(self): install.run(self) - os.system('cosmicpi-postinstall') + #os.system('cosmicpi-postinstall') setup(name='cosmicpi', version='1.5.2', description='Open source cosmic ray detector', long_description='The Cosmic Pi project aims to build the world\'s largest open source distributed cosmic ray telescope. You too can be a part of the project, by becoming a Cosmic Pixel!', - platforms=["noarch"], + platforms=['noarch'], maintainer='Cosmic Pi Team', maintainer_email='info@cosmicpi.org', url='http://cosmicpi.org/', @@ -24,8 +24,12 @@ setup(name='cosmicpi', 'cosmicpi.storage', 'cosmicpi.ui', ], + package_data={ + 'cosmicpi.ui': ['dist/*', 'index.html'], + 'cosmicpi.storage': ['cosmicpi.sqlite3'], + }, data_files=[ - # ('/etc/systemd/system/', ['data_files/*.service']), + ('/etc/systemd/system/', ['data_files/*.service']), ('/etc', ['data_files/cosmicpi.config']), ], install_requires=[