Fix pargs.letsencyrpt
This commit is contained in:
2
install
2
install
@@ -185,9 +185,9 @@ wo_install_dep() {
|
||||
wget https://download.opensuse.org/repositories/home:virtubox:WordOps/Debian_9.0/Release.key -O Release.key
|
||||
apt-key add - < Release.key
|
||||
rm -f Release.key
|
||||
[ -d /etc/apt/trusted.gpg.d ] && { wget -qO /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg; }
|
||||
# install dependencies
|
||||
DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confmiss" -o Dpkg::Options::="--force-confold" -y install build-essential curl gzip dirmngr sudo python3 python3-apt python3-setuptools python3-dev ca-certificates sqlite3 git tar software-properties-common pigz apt-transport-https gnupg2 cron ccze rsync tree haveged ufw > /dev/null 2>&1
|
||||
[ -d /etc/apt/trusted.gpg.d ] && { wget -qO /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg; }
|
||||
fi
|
||||
|
||||
locale-gen en
|
||||
|
||||
@@ -360,6 +360,7 @@ class WOSiteCreateController(CementBaseController):
|
||||
|
||||
@expose(hide=True)
|
||||
def default(self):
|
||||
pargs = self.app.pargs
|
||||
# self.app.render((data), 'default.mustache')
|
||||
# Check domain name validation
|
||||
data = dict()
|
||||
|
||||
@@ -1538,12 +1538,14 @@ class WOStackController(CementBaseController):
|
||||
|
||||
# PHPMYADMIN
|
||||
if self.app.pargs.phpmyadmin:
|
||||
Log.debug(self, "Setting packages variable for phpMyAdmin ")
|
||||
self.app.pargs.composer = True
|
||||
packages = packages + [["https://github.com/phpmyadmin/"
|
||||
"phpmyadmin/archive/STABLE.tar.gz",
|
||||
"/var/lib/wo/tmp/pma.tar.gz",
|
||||
"phpMyAdmin"]]
|
||||
if not os.path.isdir('/var/www/22222/htdocs/db/pma'):
|
||||
Log.debug(self, "Setting packages variable "
|
||||
"for phpMyAdmin ")
|
||||
self.app.pargs.composer = True
|
||||
packages = packages + [["https://github.com/phpmyadmin/"
|
||||
"phpmyadmin/archive/STABLE.tar.gz",
|
||||
"/var/lib/wo/tmp/pma.tar.gz",
|
||||
"phpMyAdmin"]]
|
||||
# Composer
|
||||
if self.app.pargs.composer:
|
||||
Log.debug(self, "Setting packages variable for Composer ")
|
||||
@@ -1552,16 +1554,16 @@ class WOStackController(CementBaseController):
|
||||
"Composer"]]
|
||||
# PHPREDISADMIN
|
||||
if self.app.pargs.phpredisadmin:
|
||||
Log.debug(self, "Setting packages variable for phpRedisAdmin")
|
||||
self.app.pargs.composer = True
|
||||
packages = packages + [["https://github.com/erikdubbelboer/"
|
||||
"phpRedisAdmin/archive/v1.11.3.tar.gz",
|
||||
"/var/lib/wo/tmp/pra.tar.gz",
|
||||
"phpRedisAdmin"],
|
||||
["https://github.com/nrk/predis/"
|
||||
"archive/v1.1.1.tar.gz",
|
||||
"/var/lib/wo/tmp/predis.tar.gz",
|
||||
"Predis"]]
|
||||
if not os.path.isdir('/var/www/22222/htdocs/cache/redis'):
|
||||
Log.debug(
|
||||
self, "Setting packages variable for phpRedisAdmin")
|
||||
self.app.pargs.composer = True
|
||||
packages = packages + [["https://github.com/"
|
||||
"erikdubbelboer/"
|
||||
"phpRedisAdmin/archive"
|
||||
"/ v1.11.3.tar.gz",
|
||||
"/var/lib/wo/tmp/pra.tar.gz",
|
||||
"phpRedisAdmin"]]
|
||||
# ADMINER
|
||||
if self.app.pargs.adminer:
|
||||
Log.debug(self, "Setting packages variable for Adminer ")
|
||||
@@ -1592,17 +1594,19 @@ class WOStackController(CementBaseController):
|
||||
|
||||
# WordOps Dashboard
|
||||
if self.app.pargs.dashboard:
|
||||
Log.debug(self, "Setting packages variable for WO-Dashboard")
|
||||
packages = packages + \
|
||||
[["https://github.com/WordOps/"
|
||||
"wordops-dashboard/releases/"
|
||||
"download/v1.0/wo-dashboard.tar.gz",
|
||||
"/var/lib/wo/tmp/wo-dashboard.tar.gz",
|
||||
"WordOps Dashboard"],
|
||||
["https://github.com/soerennb/"
|
||||
"extplorer/archive/v2.1.11.tar.gz",
|
||||
"/var/lib/wo/tmp/extplorer.tar.gz",
|
||||
"eXtplorer"]]
|
||||
if not os.path.isfile('/var/www/22222/htdocs/index.php'):
|
||||
Log.debug(
|
||||
self, "Setting packages variable for WO-Dashboard")
|
||||
packages = packages + \
|
||||
[["https://github.com/WordOps/"
|
||||
"wordops-dashboard/releases/"
|
||||
"download/v1.0/wo-dashboard.tar.gz",
|
||||
"/var/lib/wo/tmp/wo-dashboard.tar.gz",
|
||||
"WordOps Dashboard"],
|
||||
["https://github.com/soerennb/"
|
||||
"extplorer/archive/v2.1.11.tar.gz",
|
||||
"/var/lib/wo/tmp/extplorer.tar.gz",
|
||||
"eXtplorer"]]
|
||||
|
||||
# UTILS
|
||||
if self.app.pargs.utils:
|
||||
|
||||
@@ -85,7 +85,7 @@ class WOStackUpgradeController(CementBaseController):
|
||||
if ((not self.app.pargs.web) and (not self.app.pargs.nginx) and
|
||||
(not self.app.pargs.php) and (not self.app.pargs.mysql) and
|
||||
(not self.app.pargs.all) and (not self.app.pargs.wpcli) and
|
||||
(not self.app.pargs.netdata) and
|
||||
(not self.app.pargs.netdata) and (not self.app.pargs.composer)
|
||||
(not self.app.pargs.phpmyadmin) and
|
||||
(not self.app.pargs.redis)):
|
||||
self.app.pargs.web = True
|
||||
@@ -161,6 +161,14 @@ class WOStackUpgradeController(CementBaseController):
|
||||
else:
|
||||
Log.error(self, "phpMyAdmin isn't installed")
|
||||
|
||||
if self.app.pargs.composer:
|
||||
if os.path.isfile('/usr/local/bin/composer'):
|
||||
packages = packages + [["https://getcomposer.org/installer",
|
||||
"/var/lib/wo/tmp/composer-install",
|
||||
"Composer"]]
|
||||
else:
|
||||
Log.error(self, "Composer isn't installed")
|
||||
|
||||
if len(packages) or len(apt_packages):
|
||||
|
||||
Log.info(self, "During package update process non nginx-cached"
|
||||
@@ -206,6 +214,16 @@ class WOStackUpgradeController(CementBaseController):
|
||||
WOShellExec.cmd_exec(self, "/bin/bash /var/lib/wo/tmp/"
|
||||
"kickstart.sh "
|
||||
"--dont-wait")
|
||||
|
||||
if self.app.pargs.composer:
|
||||
Log.info(self, "Upgrading Composer, please wait...")
|
||||
WOShellExec.cmd_exec(self, "php -q /var/lib/wo"
|
||||
"/tmp/composer-install "
|
||||
"--install-dir=/var/lib/wo/tmp/")
|
||||
shutil.copyfile('/var/lib/wo/tmp/composer.phar',
|
||||
'/usr/local/bin/composer')
|
||||
WOFileUtils.chmod(self, "/usr/local/bin/composer", 0o775)
|
||||
|
||||
if self.app.pargs.phpmyadmin:
|
||||
Log.info(self, "Upgrading phpMyAdmin, please wait...")
|
||||
WOExtract.extract(
|
||||
|
||||
Reference in New Issue
Block a user