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