mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Correct SPF + reload SSOwat conf at user modifications
This commit is contained in:
parent
7bf50c672c
commit
fe3936e42b
3 changed files with 5 additions and 3 deletions
|
@ -127,7 +127,7 @@ def domain_add(domains, main=False):
|
||||||
domain +'. IN NS ns.'+ domain +'.',
|
domain +'. IN NS ns.'+ domain +'.',
|
||||||
domain +'. IN A '+ ip,
|
domain +'. IN A '+ ip,
|
||||||
domain +'. IN MX 5 '+ domain +'.',
|
domain +'. IN MX 5 '+ domain +'.',
|
||||||
domain +'. IN TXT "v=spf1 a mx a:'+ domain +' ?all"',
|
domain +'. IN TXT "v=spf1 mx a -all"',
|
||||||
'ns.'+ domain +'. IN A '+ ip,
|
'ns.'+ domain +'. IN A '+ ip,
|
||||||
'_xmpp-client._tcp.'+ domain +'. IN SRV 0 5 5222 '+ domain +'.',
|
'_xmpp-client._tcp.'+ domain +'. IN SRV 0 5 5222 '+ domain +'.',
|
||||||
'_xmpp-server._tcp.'+ domain +'. IN SRV 0 5 5269 '+ domain +'.',
|
'_xmpp-server._tcp.'+ domain +'. IN SRV 0 5 5269 '+ domain +'.',
|
||||||
|
|
|
@ -114,7 +114,7 @@ def dyndns_update(dyn_host="dynhost.yunohost.org", domain=None, key=None, ip=Non
|
||||||
'update delete _xmpp-server._tcp.'+ domain +'. SRV',
|
'update delete _xmpp-server._tcp.'+ domain +'. SRV',
|
||||||
'update add '+ domain +'. 1800 A '+ new_ip,
|
'update add '+ domain +'. 1800 A '+ new_ip,
|
||||||
'update add '+ domain +'. 14400 MX 5 '+ domain +'.',
|
'update add '+ domain +'. 14400 MX 5 '+ domain +'.',
|
||||||
'update add '+ domain +'. 14400 TXT "v=spf1 a mx a:'+ domain +'. ?all"',
|
'update add '+ domain +'. 14400 TXT "v=spf1 a mx -all"',
|
||||||
'update add pubsub.'+ domain +'. 1800 A '+ new_ip,
|
'update add pubsub.'+ domain +'. 1800 A '+ new_ip,
|
||||||
'update add muc.'+ domain +'. 1800 A '+ new_ip,
|
'update add muc.'+ domain +'. 1800 A '+ new_ip,
|
||||||
'update add vjud.'+ domain +'. 1800 A '+ new_ip,
|
'update add vjud.'+ domain +'. 1800 A '+ new_ip,
|
||||||
|
|
|
@ -115,6 +115,7 @@ def user_create(username, firstname, lastname, mail, password):
|
||||||
pwd_changed = os.system('echo "'+ password +'\n'+ password +'" | smbldap-passwd '+ username)
|
pwd_changed = os.system('echo "'+ password +'\n'+ password +'" | smbldap-passwd '+ username)
|
||||||
|
|
||||||
if user_added == pwd_changed == 0:
|
if user_added == pwd_changed == 0:
|
||||||
|
os.system('yunohost app ssowatconf > /dev/null 2>&1')
|
||||||
#TODO: Send a welcome mail to user
|
#TODO: Send a welcome mail to user
|
||||||
win_msg(_("User successfully created"))
|
win_msg(_("User successfully created"))
|
||||||
return { _("Fullname") : firstname +' '+ lastname, _("Username") : username, _("Mail") : mail }
|
return { _("Fullname") : firstname +' '+ lastname, _("Username") : username, _("Mail") : mail }
|
||||||
|
@ -139,7 +140,7 @@ def user_delete(users, purge=False):
|
||||||
|
|
||||||
for user in users:
|
for user in users:
|
||||||
delete_command = '/usr/sbin/smbldap-userdel'
|
delete_command = '/usr/sbin/smbldap-userdel'
|
||||||
if purge:
|
if purge:
|
||||||
delete_command = delete_command +' -r '+ user
|
delete_command = delete_command +' -r '+ user
|
||||||
else:
|
else:
|
||||||
delete_command = delete_command +' '+ user
|
delete_command = delete_command +' '+ user
|
||||||
|
@ -149,6 +150,7 @@ def user_delete(users, purge=False):
|
||||||
else:
|
else:
|
||||||
raise YunoHostError(169, _("An error occured during user deletion"))
|
raise YunoHostError(169, _("An error occured during user deletion"))
|
||||||
|
|
||||||
|
os.system('yunohost app ssowatconf > /dev/null 2>&1')
|
||||||
win_msg(_("User(s) successfully deleted"))
|
win_msg(_("User(s) successfully deleted"))
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue