Cron install/uninstall

This commit is contained in:
titoko 2013-03-13 09:34:29 +01:00
parent 80ff31022f
commit eb39a80db0
2 changed files with 7 additions and 4 deletions

View file

@ -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 #

View file

@ -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"))