mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-12 16:26:12 +01:00
bug fix incbackups for ubuntu
This commit is contained in:
@@ -122,7 +122,8 @@ class IncJobs(multi.Thread):
|
|||||||
|
|
||||||
def findRestorePath(self):
|
def findRestorePath(self):
|
||||||
|
|
||||||
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8:
|
if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8 \
|
||||||
|
or ProcessUtilities.decideDistro() == ProcessUtilities.ubuntu20:
|
||||||
self.restoreTarget = '/'
|
self.restoreTarget = '/'
|
||||||
return 1
|
return 1
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -1175,7 +1175,7 @@ virtualenv -p /usr/bin/python3 /usr/local/CyberCP
|
|||||||
if [[ $UBUNTU_20 == "False" ]] ; then
|
if [[ $UBUNTU_20 == "False" ]] ; then
|
||||||
source /usr/local/CyberCP/bin/activate
|
source /usr/local/CyberCP/bin/activate
|
||||||
check_return
|
check_return
|
||||||
pip3.6 install --ignore-installed /usr/local/pip-packs/*
|
pip3 install --ignore-installed /usr/local/pip-packs/*
|
||||||
check_return
|
check_return
|
||||||
else
|
else
|
||||||
. /usr/local/CyberCP/bin/activate
|
. /usr/local/CyberCP/bin/activate
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ class ProcessUtilities(multi.Thread):
|
|||||||
centos = 1
|
centos = 1
|
||||||
cent8 = 2
|
cent8 = 2
|
||||||
ubuntu = 0
|
ubuntu = 0
|
||||||
|
ubuntu20 = 3
|
||||||
server_address = '/usr/local/lscpd/admin/comm.sock'
|
server_address = '/usr/local/lscpd/admin/comm.sock'
|
||||||
token = "unset"
|
token = "unset"
|
||||||
|
|
||||||
@@ -139,6 +140,8 @@ class ProcessUtilities(multi.Thread):
|
|||||||
distroPath = '/etc/lsb-release'
|
distroPath = '/etc/lsb-release'
|
||||||
|
|
||||||
if os.path.exists(distroPath):
|
if os.path.exists(distroPath):
|
||||||
|
if open(distroPath, 'r').read().find('20.04') > -1:
|
||||||
|
return ProcessUtilities.ubuntu20
|
||||||
return ProcessUtilities.ubuntu
|
return ProcessUtilities.ubuntu
|
||||||
else:
|
else:
|
||||||
if open('/etc/redhat-release', 'r').read().find('CentOS Linux release 8') > -1:
|
if open('/etc/redhat-release', 'r').read().find('CentOS Linux release 8') > -1:
|
||||||
|
|||||||
Reference in New Issue
Block a user