diff --git a/src/add_admin.py b/src/add_admin.py index f732848..594a031 100644 --- a/src/add_admin.py +++ b/src/add_admin.py @@ -1,6 +1,7 @@ #!/usr/bin/env python from gi.repository import Gtk, Gdk +import os import pickle from gbi_common import password_strength from sys_handler import set_admin_user @@ -29,7 +30,10 @@ def save_selection(self): name = self.name.get_text() up = self.password.get_text() shell = self.sh - hf = f'/home/{uname}' + if os.path.isdir('/Users'): + hf = f'/Users/{uname}' + else: + hf = f'/home/{uname}' hst = f'{uname}-ghostbsd' ul = [uname, name, up, shell, hf, hst] pickle.dump(ul, uf) @@ -114,7 +118,10 @@ def __init__(self, button3): self.repassword.connect("changed", self.password_verification, button3) self.label5 = Gtk.Label(label="Shell") shell = Gtk.ComboBoxText() - self.sh = '/usr/local/bin/fish' + if os.path.isdir('/Users'): + self.sh = '/usr/local/bin/zsh' + else: + self.sh = '/usr/local/bin/fish' # Keeping this code for future project example. shell.append_text('sh') shell.append_text('csh')