From 332110349838dfa057f5cabb840dd7da3e4db669 Mon Sep 17 00:00:00 2001 From: Alexis Gavoty Date: Sat, 26 Oct 2013 22:10:22 +0200 Subject: [PATCH] Update yunohost_tools.py --- yunohost_tools.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/yunohost_tools.py b/yunohost_tools.py index 9c4e32e1..b4239ad5 100644 --- a/yunohost_tools.py +++ b/yunohost_tools.py @@ -244,8 +244,9 @@ def tools_postinstall(domain, password, dyndns=False): os.system('hostname yunohost.yunohost.org') # Samba sh*t fix - os.system('net setlocalsid $(ldapsearch -x -b "dc=yunohost,dc=org" -LLL "(objectclass=sambaDomain)" | grep SID | awk \'{print $2}\')') - os.system('smbpasswd -w yunohost') + if os.system('net getlocalsid') != 0: + os.system('apt-get install --reinstall -y -qq samba yunohost-config-samba') + os.system('smbpasswd -w yunohost') # Create SSL CA ssl_dir = '/usr/share/yunohost/yunohost-config/ssl/yunoCA'