Fix passwd variable
This commit is contained in:
2
setup.py
2
setup.py
@@ -62,7 +62,7 @@ setup(name='wo',
|
||||
classifiers=[],
|
||||
keywords='',
|
||||
author='WordOps',
|
||||
author_email='core@wordops.net',
|
||||
author_email='contact@wordops.io',
|
||||
url='https://wordops.net',
|
||||
license='MIT',
|
||||
packages=find_packages(exclude=['ez_setup', 'examples', 'tests',
|
||||
|
||||
@@ -79,10 +79,6 @@ class WOStackMigrateController(CementBaseController):
|
||||
# Install MariaDB
|
||||
apt_packages = WOVariables.wo_mysql
|
||||
|
||||
# If PHP is installed then install php7.2-mysql
|
||||
if WOAptGet.is_installed(self, "php7.2-fpm"):
|
||||
apt_packages = apt_packages + ["php7.2-mysql"]
|
||||
|
||||
Log.info(self, "Updating apt-cache, hang on...")
|
||||
WOAptGet.update(self)
|
||||
Log.info(self, "Installing MariaDB, hang on...")
|
||||
|
||||
@@ -412,7 +412,7 @@ def post_pref(self, apt_packages, packages):
|
||||
out=wo_nginx)
|
||||
wo_nginx.close()
|
||||
|
||||
randompass = ''.join([random.choice
|
||||
passwd = ''.join([random.choice
|
||||
(string.ascii_letters + string.digits)
|
||||
for n in range(24)])
|
||||
try:
|
||||
@@ -421,7 +421,7 @@ def post_pref(self, apt_packages, packages):
|
||||
"{password} 2> /dev/null)\n\""
|
||||
"> /etc/nginx/htpasswd-wo "
|
||||
"2>/dev/null"
|
||||
.format(password=randompass))
|
||||
.format(password=passwd))
|
||||
except CommandExecutionError as e:
|
||||
Log.debug(self, "{0}".format(e))
|
||||
Log.error(self, "Failed to save HTTP Auth")
|
||||
|
||||
Reference in New Issue
Block a user