diff --git a/src/moulinette/yunohost/app.py b/src/moulinette/yunohost/app.py index 70d8f978..d1b84c38 100644 --- a/src/moulinette/yunohost/app.py +++ b/src/moulinette/yunohost/app.py @@ -610,7 +610,7 @@ def app_removeaccess(apps, users): def app_setting(app, key, value=None, delete=False): """ - Set ou get an app setting value + Set or get an app setting value Keyword argument: value -- Value to set diff --git a/src/moulinette/yunohost/firewall.py b/src/moulinette/yunohost/firewall.py index ae83a7cc..1c4529c5 100644 --- a/src/moulinette/yunohost/firewall.py +++ b/src/moulinette/yunohost/firewall.py @@ -138,10 +138,14 @@ def firewall_reload(upnp=False): add_portmapping('TCP', upnp, False, 'r') add_portmapping('UDP', upnp, False, 'r') + ipv6 = False if os.path.exists("/proc/net/if_inet6"): add_portmapping('TCP', upnp, True, 'r') add_portmapping('UDP', upnp, True, 'r') + ipv6 = True + + hook_callback('post_iptable_rules', [upnp, ipv6]) os.system("iptables -A INPUT -i lo -j ACCEPT") os.system("iptables -A INPUT -p icmp -j ACCEPT") diff --git a/src/moulinette/yunohost/hook.py b/src/moulinette/yunohost/hook.py index 2aea8706..4d7c7838 100644 --- a/src/moulinette/yunohost/hook.py +++ b/src/moulinette/yunohost/hook.py @@ -114,8 +114,8 @@ def hook_check(file): raise YunoHostError(22, _("Invalid app package")) action = file[file.index('scripts/') + 8:] - if action in manifest["arguments"]: - return manifest["arguments"][action] + if 'arguments' in manifest and action in manifest['arguments']: + return manifest['arguments'][action] else: return {} diff --git a/src/moulinette/yunohost/tools.py b/src/moulinette/yunohost/tools.py index 1300063c..4c8e0db0 100644 --- a/src/moulinette/yunohost/tools.py +++ b/src/moulinette/yunohost/tools.py @@ -224,8 +224,10 @@ def tools_postinstall(domain, password, dyndns=False): os.system('touch /etc/yunohost/light') else: os.system('service dspam stop') + os.system('chmod -x /etc/cron.daily/dspam') os.system('update-rc.d dspam remove') os.system('sed -i "s/yes/no/g" /etc/default/dspam') + os.system('sed -i "s/dspam=no/dspam=yes/" /etc/yunohost/yunohost.conf') os.system('apt-get install -y -qq yunohost-config-amavis') os.system('service amavis start') os.system('apt-get install --reinstall -y -qq yunohost-config-postfix yunohost-config-dovecot') diff --git a/yunohost.tac b/yunohost.tac index af917180..b3d1ac61 100755 --- a/yunohost.tac +++ b/yunohost.tac @@ -42,8 +42,10 @@ def http_exec(request, **kwargs): # Simple HTTP auth elif installed: - authorized = request.getUser() == 'admin' + authorized = False pwd = request.getPassword() + if request.getUser() == 'admin' and pwd != '': + authorized = True if dev and 'api_key' in request.args: pwd = request.args['api_key'][0] authorized = True