From c5ea04d06f551744828a90d1885e3f9ff697fd02 Mon Sep 17 00:00:00 2001 From: rperper Date: Mon, 29 Oct 2018 16:26:07 -0400 Subject: [PATCH] Fixed various issues --- install/install.py | 5 ++++- install/installCyberPanel.py | 14 ++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/install/install.py b/install/install.py index 34d1301bd..de6ceefcb 100755 --- a/install/install.py +++ b/install/install.py @@ -82,7 +82,7 @@ class preFlightsChecks: if self.distro == ubuntu: self.stdOut("Add Cyberpanel user") - command = "useradd cyberpanel -g sudo" + command = "useradd cyberpanel -U -G sudo" cmd = shlex.split(command) res = subprocess.call(cmd) if res != 0 and res != 9: @@ -703,6 +703,9 @@ class preFlightsChecks: break def fix_selinux_issue(self): + if (self.distro == ubuntu): + return + try: cmd = [] diff --git a/install/installCyberPanel.py b/install/installCyberPanel.py index 6e7451544..3b330d3fa 100644 --- a/install/installCyberPanel.py +++ b/install/installCyberPanel.py @@ -1160,13 +1160,19 @@ class InstallCyberPanel: except: pass - command = 'adduser lscpd -M -d /usr/local/lscp' + if self.distro == centos: + command = 'adduser lscpd -M -d /usr/local/lscp' + else: + command = 'useradd lscpd -M -d /usr/local/lscp' + cmd = shlex.split(command) res = subprocess.call(cmd) - command = 'groupadd lscpd' - cmd = shlex.split(command) - res = subprocess.call(cmd) + if self.distro == centos: + command = 'groupadd lscpd' + cmd = shlex.split(command) + res = subprocess.call(cmd) + # Added group in useradd for Ubuntu command = 'usermod -a -G lscpd lscpd' cmd = shlex.split(command)