def main(): """Main routine of houndsploit.""" if platform.system() == "Windows": init_path = os.path.expanduser("~") + "\.HoundSploit" if check_file_existence(init_path + "/houndsploit_sw.lock"): print("Before executing HoundSploit run:") print("\tPS> pip install -r " + init_path + "\houndsploit\requirements.txt") print("\tPS> cd " + init_path + "\houndsploit") print("\tPS> python setup.py install") print("\tPS> rm " + init_path + "\houndsploit_sw.lock") print("\tPS> houndsploit") exit(1) if not os.path.isfile(init_path + "\hound_db.sqlite3"): create_db() else: init_path = os.path.expanduser("~") + "/.HoundSploit" if not path.exists(init_path): migrate_to_new_installation() if check_file_existence(init_path + "/houndsploit_sw.lock"): print("Before executing HoundSploit run:") print("\t$ pip install -r " + init_path + "/houndsploit/requirements.txt") print("\t$ cd " + init_path + "/houndsploit") print("\t$ python setup.py install") print("\t$ rm " + init_path + "/houndsploit_sw.lock") print("\t$ houndsploit") exit(1) if not os.path.isfile(init_path + "/hound_db.sqlite3"): create_db() start_app()
def get_updates(): """ Check and download new updates for the software and the database :return: settings templates """ install_updates() if check_file_existence(init_path + "/houndsploit_db.lock"): if check_file_existence(init_path + "/hound_db.sqlite3"): os.remove(init_path + "/hound_db.sqlite3") create_db() db_update_alert = True else: db_update_alert = False if check_file_existence(init_path + "/houndsploit_sw.lock"): sw_update_alert = True else: sw_update_alert = False if sw_update_alert == False and db_update_alert == False: no_updates_alert = True else: no_updates_alert = False return render_template('settings.html', latest_db_update=get_latest_db_update_date(), db_update_alert=db_update_alert, sw_update_alert=sw_update_alert, no_updates_alert=no_updates_alert)
def main(): """Main routine of houndsploit.""" init_path = os.path.expanduser("~") + "/HoundSploit" if check_file_existence(init_path + "/houndsploit_sw.lock"): print("Before executing HoundSploit run:") print("\t$ pip install -r " + init_path + "/houndsploit/requirements.txt") print("\t$ python " + init_path + "/houndsploit/setup.py install") print("\t$ houndsploit") exit(1) if not os.path.isfile(init_path + "/hound_db.sqlite3"): create_db() start_app()