From eb39a80db08aa481ae810c977e8038769414e9aa Mon Sep 17 00:00:00 2001 From: titoko Date: Wed, 13 Mar 2013 09:34:29 +0100 Subject: [PATCH] Cron install/uninstall --- action_map.yml | 8 ++++---- yunohost_firewall.py | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/action_map.yml b/action_map.yml index 4cae9976..dcda6abf 100644 --- a/action_map.yml +++ b/action_map.yml @@ -491,13 +491,13 @@ firewall: action: store_true - ### firewall_upnpinstall() - upnpinstall: + ### firewall_installupnp() + installupnp: action_help: Add upnp cron - ### firewall_upnpremove() - upnpremove: + ### firewall_removeupnp() + removeupnp: action_help: Remove upnp cron ############################# # Tools # diff --git a/yunohost_firewall.py b/yunohost_firewall.py index d810939d..62f8f59e 100644 --- a/yunohost_firewall.py +++ b/yunohost_firewall.py @@ -228,6 +228,9 @@ def firewall_installupnp(): """ os.system("touch /etc/cron.d/yunohost-firewall") os.system("echo '*/50 * * * * root yunohost firewall reload -u>>/dev/null'>/etc/cron.d/yunohost-firewall") + win_msg(_("Upnp install")) + def firewall_removeupnp(): os.system("rm /etc/cron.d/yunohost-firewall") + win_msg(_("Upnp remove"))