diff --git a/yunohost_app.py b/yunohost_app.py index a3beeb4b..9014dca2 100644 --- a/yunohost_app.py +++ b/yunohost_app.py @@ -73,15 +73,18 @@ def app_fetchlist(url=None, name=None): try: os.listdir(repo_path) except OSError: os.makedirs(repo_path) - if not url: + if url is None: url = 'http://app.yunohost.org/list.json' name = 'yunohost' else: - if not name: raise YunoHostError(22, _("You must indicate a name for your custom list")) + if name is None: raise YunoHostError(22, _("You must indicate a name for your custom list")) if os.system('wget "'+ url +'" -O "'+ repo_path +'/'+ name +'.json"') != 0: raise YunoHostError(1, _("List server connection failed")) + os.system("touch /etc/cron.d/yunohost-applist-"+ name) + os.system("echo '00 00 * * * root yunohost app fetchlist -u "+ url +" -n "+ name +" --no-ldap >> /dev/null' >/etc/cron.d/yunohost-applist-"+ name) + win_msg(_("List successfully fetched")) @@ -95,6 +98,7 @@ def app_removelist(name): """ try: os.remove(repo_path +'/'+ name + '.json') + os.remove("/etc/cron.d/yunohost-applist-"+ name) except OSError: raise YunoHostError(22, _("Unknown list")) diff --git a/yunohost_dyndns.py b/yunohost_dyndns.py index 334a608d..2f91c2fe 100644 --- a/yunohost_dyndns.py +++ b/yunohost_dyndns.py @@ -146,7 +146,7 @@ def dyndns_installcron(): """ os.system("touch /etc/cron.d/yunohost-dyndns") - os.system("echo '*/30 * * * * root yunohost dyndns update >> /dev/null' >/etc/cron.d/yunohost-dyndns") + os.system("echo '*/30 * * * * root yunohost dyndns update --no-ldap >> /dev/null' >/etc/cron.d/yunohost-dyndns") win_msg(_("DynDNS cron installed")) diff --git a/yunohost_firewall.py b/yunohost_firewall.py index fe52a946..91aaa3f3 100644 --- a/yunohost_firewall.py +++ b/yunohost_firewall.py @@ -310,7 +310,7 @@ def firewall_installupnp(): firewall['UPNP']['cron'] = True os.system("touch /etc/cron.d/yunohost-firewall") - os.system("echo '*/50 * * * * root yunohost firewall reload -u>>/dev/null'>/etc/cron.d/yunohost-firewall") + os.system("echo '*/50 * * * * root yunohost firewall reload -u --no-ldap >>/dev/null'>/etc/cron.d/yunohost-firewall") win_msg(_("UPNP cron installed")) os.system("mv /etc/yunohost/firewall.yml /etc/yunohost/firewall.yml.old")