some small fixes
Fixed before release: - stack lemp not acepting stable/mainline parameter. - external db unattended not working. - httpauth delete similar names issues. - mysql site with external db not should need wp prefix parameter, removed! - ssl-on failing due to subdomain check.
This commit is contained in:
parent
a0a8981f0c
commit
32d998643a
|
@ -57,10 +57,10 @@ db_delete() {
|
|||
fi
|
||||
else
|
||||
if [[ $dbdatadel == "true" ]]; then
|
||||
local dbdatauser=$(echo "${dbdata}" | cut -d',' -f 3 -s)
|
||||
local dbdatapass=$(echo "${dbdata}" | cut -d',' -f 4 -s)
|
||||
local uroot=$(echo "${dbdata}" | cut -d',' -f 3 -s)
|
||||
local proot=$(echo "${dbdata}" | cut -d',' -f 4 -s)
|
||||
fi
|
||||
if [[ -z $dbdatauser || -z $dbdatapass ]]; then
|
||||
if [[ -z $uroot || -z $proot ]]; then
|
||||
echo ""
|
||||
echo "${gre}External DB found in $domain (Press 'Enter' key twice to skip and not delete)"
|
||||
read -p "${blu}External DB root username [root]: " uroot
|
||||
|
@ -68,7 +68,7 @@ db_delete() {
|
|||
read -p "External DB root password: " proot
|
||||
fi
|
||||
if [[ $uroot == "root" && -z $proot ]]; then
|
||||
echo "${red} Action aborted, database not deteted!"
|
||||
echo "${red} Action aborted, database not deleted!"
|
||||
continue 1;
|
||||
else
|
||||
sudo mysql --connect-timeout=10 -h "$url" -P "$port" -u"$uroot" -p"$proot" -e "$dbsetup"
|
||||
|
|
|
@ -52,7 +52,7 @@ elif [[ $opt == "-delete" ]]; then
|
|||
echo "${red}User '$userpurge' does not exist!${end}"
|
||||
exit 1
|
||||
fi
|
||||
sudo sed -i "/$userpurge/d" /etc/nginx/.htpasswd
|
||||
sudo sed -i "/^$userpurge:/d" /etc/nginx/.htpasswd
|
||||
echo "${gre}User '$userpurge has been deleted successfully!${end}"
|
||||
elif [[ $opt == "-list" ]]; then
|
||||
[[ ! -a /etc/nginx/.htpasswd ]] && exit 0
|
||||
|
|
13
plugins/site
13
plugins/site
|
@ -46,7 +46,7 @@ fi
|
|||
|
||||
|
||||
# Check if site is sub-domain
|
||||
if [[ -n $domain && $type =~ ^(-html|-php|-mysql|-wp|-wpsubdir|-wpsubdom|-parked|-proxy)$ ]]; then
|
||||
if [[ -n $domain && $type =~ ^(-html|-php|-mysql|-wp|-wpsubdir|-wpsubdom|-parked|-proxy|-ssl-on)$ ]]; then
|
||||
count=1
|
||||
while true; do
|
||||
tld=$(echo "${domain}" | rev | cut -d'.' -f -$count -s | rev)
|
||||
|
@ -77,7 +77,16 @@ if [[ $type == "-wp" || $type == "-wpsubdir" || $type == "-wpsubdom" || $type ==
|
|||
wpdata=${value:1:-1}
|
||||
|
||||
# Because MySQL format not have this parameters at the beggining to match WP format. Insert it!
|
||||
[[ $type == "-mysql" || $domain == "-mysql" ]] && wpdata=${wpdata/#/true,false,}
|
||||
if [[ $type == "-mysql" || $domain == "-mysql" ]]; then
|
||||
wpdata=${wpdata/#/true,false,}
|
||||
# Insert wp_prefix if external db data is found.
|
||||
extdata=$(echo "${wpdata,,}" | cut -d',' -f 7- -s)
|
||||
if [[ -n $extdata ]]; then
|
||||
wpdata=$(echo "${wpdata,,}" | cut -d',' -f -6 -s)
|
||||
wpdata=${wpdata/%/,false,}
|
||||
wpdata=${wpdata/%/$extdata}
|
||||
fi
|
||||
fi
|
||||
|
||||
# Double coma is for lower case convertion
|
||||
setmsqcustom=$(echo "${wpdata,,}" | cut -d',' -f 1 -s)
|
||||
|
|
|
@ -388,7 +388,7 @@ elif [[ $opt == "-pma" ]]; then
|
|||
[[ $(conf_read mysql-tool) != "true" ]] && mysql_tool || echo "${red}PhpMyAdmin is already installed!${end}"
|
||||
|
||||
elif [[ $opt == "-lemp" ]]; then
|
||||
stack -nginx $arg
|
||||
[[ $value =~ ^(stable|mainline)$ ]] && stack -nginx=$value $arg || stack -nginx $arg
|
||||
stack -php $arg
|
||||
stack -mysql $arg
|
||||
echo ""
|
||||
|
|
3
weby
3
weby
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Webinoly Installation Script.
|
||||
webyversion="1.4.0-beta"
|
||||
webyversion="1.4.0"
|
||||
|
||||
|
||||
# Check OS support
|
||||
|
@ -77,7 +77,6 @@ if [[ -a /opt/webinoly/webinoly.conf && -n $(conf_read tools-port) ]]; then
|
|||
else
|
||||
portools="22222"
|
||||
[[ -n $2 && $2 != "-ver="* ]] && portools="$2"
|
||||
echo $portools
|
||||
tools_port $portools
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue