mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-13 16:56:09 +01:00
rainloop admin password
This commit is contained in:
@@ -483,25 +483,25 @@ class preFlightsChecks:
|
||||
|
||||
def fixCyberPanelPermissions(self):
|
||||
|
||||
try:
|
||||
import randomPassword
|
||||
|
||||
content = """<?php
|
||||
|
||||
$_ENV['RAINLOOP_INCLUDE_AS_API'] = true;
|
||||
include '/usr/local/CyberCP/public/rainloop/index.php';
|
||||
|
||||
$oConfig = \RainLoop\Api::Config();
|
||||
$oConfig->SetPassword('%s');
|
||||
echo $oConfig->Save() ? 'Done' : 'Error';
|
||||
|
||||
?>""" % (randomPassword.generate_pass())
|
||||
|
||||
writeToFile = open('/usr/local/CyberCP/public/rainloop.php', 'w')
|
||||
writeToFile.write(content)
|
||||
writeToFile.close()
|
||||
except:
|
||||
pass
|
||||
# try:
|
||||
# import randomPassword
|
||||
#
|
||||
# content = """<?php
|
||||
#
|
||||
# $_ENV['RAINLOOP_INCLUDE_AS_API'] = true;
|
||||
# include '/usr/local/CyberCP/public/rainloop/index.php';
|
||||
#
|
||||
# $oConfig = \RainLoop\Api::Config();
|
||||
# $oConfig->SetPassword('%s');
|
||||
# echo $oConfig->Save() ? 'Done' : 'Error';
|
||||
#
|
||||
# ?>""" % (randomPassword.generate_pass())
|
||||
#
|
||||
# writeToFile = open('/usr/local/CyberCP/public/rainloop.php', 'w')
|
||||
# writeToFile.write(content)
|
||||
# writeToFile.close()
|
||||
# except:
|
||||
# pass
|
||||
|
||||
###### fix Core CyberPanel permissions
|
||||
|
||||
@@ -651,8 +651,8 @@ echo $oConfig->Save() ? 'Done' : 'Error';
|
||||
|
||||
###
|
||||
|
||||
command = '/usr/local/lsws/lsphp72/bin/php /usr/local/CyberCP/public/rainloop.php'
|
||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||
# command = '/usr/local/lsws/lsphp72/bin/php /usr/local/CyberCP/public/rainloop.php'
|
||||
# preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||
|
||||
def install_unzip(self):
|
||||
self.stdOut("Install unzip")
|
||||
|
||||
Reference in New Issue
Block a user