Moving v-install-wordpress to --parameters

This commit is contained in:
myvesta 2021-09-30 16:41:36 +02:00 committed by GitHub
commit 402131c22b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,14 +17,15 @@ fi
# Argument definition
domain=$1
database="wp";
if [ $# -gt 1 ]; then
database=$2
# take --parameters
source /usr/local/vesta/func/handle_parameters.sh
if [ -z "$database" ]; then
database="wp"
fi
email="info@$domain";
if [ $# -gt 2 ]; then
email=$3
if [ -z "$emil" ]; then
email="info@$domain";
fi
user=$(/usr/local/vesta/bin/v-search-domain-owner $domain)
@ -83,11 +84,15 @@ PASSWDDB=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 8 | head -n 1)
#----------------------------------------------------------#
PROTOCOL='http'
if [ ! -f "/home/$user/conf/web/ssl.$domain.ca" ]; then
/usr/local/vesta/bin/v-add-letsencrypt-domain "$user" "$domain" "www.$domain" "yes"
if [ -z "$SKIP_LE" ]; then
if [ ! -f "/home/$user/conf/web/ssl.$domain.ca" ]; then
/usr/local/vesta/bin/v-add-letsencrypt-domain "$user" "$domain" "www.$domain" "yes"
fi
else
PROTOCOL='https'
fi
if [ -f "/home/$user/conf/web/ssl.$domain.ca" ]; then
if [ -f "/home/$user/conf/web/ssl.$domain.ca" ] || [ ! -z "$SKIP_LE" ]; then
PROTOCOL='https'
if [ -f "/usr/local/vesta/data/templates/web/nginx/force-https.stpl" ]; then
/usr/local/vesta/bin/v-change-web-domain-proxy-tpl "$user" "$domain" "force-https" "jpeg,jpg,png,gif,bmp,ico,svg,tif,tiff,css,js,ttf,otf,webp,txt,csv,rtf,doc,docx,xls,xlsx,ppt,pptx,odf,odp,ods,odt,pdf,psd,ai,eot,eps,ps,zip,tar,tgz,gz,rar,bz2,7z,aac,m4a,mp3,mp4,ogg,wav,wma,3gp,avi,flv,m4v,mkv,mov,mpeg,mpg,wmv,exe,iso,dmg,swf,woff,woff2" "yes"