diff --git a/rootfs/standard/var/www/mynode/application_info.py b/rootfs/standard/var/www/mynode/application_info.py index 7f06776e..b7d656c1 100644 --- a/rootfs/standard/var/www/mynode/application_info.py +++ b/rootfs/standard/var/www/mynode/application_info.py @@ -479,10 +479,20 @@ def clear_application_cache(): global mynode_applications mynode_applications = None +def need_application_refresh(): + global mynode_applications + if mynode_applications == None: + return True + if os.path.isfile("/tmp/need_application_refresh"): + os.system("rm /tmp/need_application_refresh") + os.system("sync") + return True + return False + def get_all_applications(order_by="none"): global mynode_applications - if mynode_applications == None: + if need_application_refresh(): initialize_applications() else: update_applications()