Install & Update Improvements
Wget instead curl, beta version installer, fixed app version in conf file after update, fixed delete installer file when not in home.
This commit is contained in:
parent
43a90a1dfd
commit
24543a5d8a
19
lib/install
19
lib/install
|
@ -1,9 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
source /opt/webinoly/lib/general
|
source /opt/webinoly/lib/general
|
||||||
|
|
||||||
webinoly_version() {
|
|
||||||
conf_write app-version 1.0.1
|
|
||||||
}
|
|
||||||
server_version() {
|
server_version() {
|
||||||
conf_write server-version 1.0
|
conf_write server-version 1.0
|
||||||
}
|
}
|
||||||
|
@ -358,21 +356,6 @@ mysql_tool() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Aplication Webinoly
|
|
||||||
app_install() {
|
|
||||||
|
|
||||||
#Download and install/update Webinoly
|
|
||||||
sudo curl -o $HOME/webinoly.tar -L https://qrok.es/wytar
|
|
||||||
sudo tar -xf $HOME/webinoly.tar -C /opt/webinoly --overwrite
|
|
||||||
sudo find /opt/webinoly -type d -exec chmod 755 {} \;
|
|
||||||
sudo find /opt/webinoly -type f -exec chmod 644 {} \;
|
|
||||||
|
|
||||||
# Plugin instalation
|
|
||||||
sudo chmod 755 /opt/webinoly/plugins/*
|
|
||||||
sudo mv /opt/webinoly/plugins/* /usr/bin/
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# Remove Intallation Files
|
# Remove Intallation Files
|
||||||
app_purge() {
|
app_purge() {
|
||||||
sudo rm $HOME/webinoly.tar
|
sudo rm $HOME/webinoly.tar
|
||||||
|
|
|
@ -8,7 +8,7 @@ source /opt/webinoly/lib/general
|
||||||
|
|
||||||
nginx_helper_plugin() {
|
nginx_helper_plugin() {
|
||||||
# Download WP (latest version)
|
# Download WP (latest version)
|
||||||
sudo curl -o /var/www/$domain/htdocs/nginx-helper-plugin.zip https://downloads.wordpress.org/plugin/nginx-helper.latest-stable.zip 2>/dev/null
|
sudo wget --timeout=15 -qrO /var/www/$domain/htdocs/nginx-helper-plugin.zip https://downloads.wordpress.org/plugin/nginx-helper.latest-stable.zip
|
||||||
sudo unzip -qq /var/www/$domain/htdocs/nginx-helper-plugin.zip -d /var/www/$domain/htdocs/wp-content/plugins/
|
sudo unzip -qq /var/www/$domain/htdocs/nginx-helper-plugin.zip -d /var/www/$domain/htdocs/wp-content/plugins/
|
||||||
sudo rm /var/www/$domain/htdocs/nginx-helper-plugin.zip
|
sudo rm /var/www/$domain/htdocs/nginx-helper-plugin.zip
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -37,7 +37,7 @@ wpinstall() {
|
||||||
done
|
done
|
||||||
|
|
||||||
# Download WP (latest version)
|
# Download WP (latest version)
|
||||||
sudo curl -o /var/www/$domain/htdocs/wp.tar.gz https://wordpress.org/latest.tar.gz
|
sudo wget --timeout=15 -qrO /var/www/$domain/htdocs/wp.tar.gz https://wordpress.org/latest.tar.gz
|
||||||
sudo tar -xf /var/www/$domain/htdocs/wp.tar.gz -C /var/www/$domain/htdocs/
|
sudo tar -xf /var/www/$domain/htdocs/wp.tar.gz -C /var/www/$domain/htdocs/
|
||||||
sudo mv /var/www/$domain/htdocs/wordpress/* /var/www/$domain/htdocs/
|
sudo mv /var/www/$domain/htdocs/wordpress/* /var/www/$domain/htdocs/
|
||||||
sudo rm -rf /var/www/$domain/htdocs/wordpress
|
sudo rm -rf /var/www/$domain/htdocs/wordpress
|
||||||
|
|
|
@ -10,9 +10,11 @@ arg="$2"
|
||||||
source /opt/webinoly/lib/install
|
source /opt/webinoly/lib/install
|
||||||
|
|
||||||
if [ "$opt" == "-update" ]; then
|
if [ "$opt" == "-update" ]; then
|
||||||
app_install
|
if [[ $arg == '-vbeta' ]]; then
|
||||||
app_purge
|
sudo wget --timeout=15 -qrO weby https://s3.amazonaws.com/dl.qrokes.com/webinoly/beta/weby && sudo bash weby -vbeta
|
||||||
webinoly_version
|
else
|
||||||
|
sudo wget --timeout=15 -qrO weby qrok.es/wy && sudo bash weby 0
|
||||||
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
echo "${gre}Webinoly App has been updated successfully!${end}"
|
echo "${gre}Webinoly App has been updated successfully!${end}"
|
||||||
elif [[ "$opt" == "-server-update" || "$opt" == "-server-reset" ]]; then
|
elif [[ "$opt" == "-server-update" || "$opt" == "-server-reset" ]]; then
|
||||||
|
|
27
weby
27
weby
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# Webinoly script.
|
# Webinoly script.
|
||||||
# This script is designed to install latest Webinoly.
|
# This script is designed to install latest Webinoly.
|
||||||
|
webyversion="1.0.2beta"
|
||||||
|
|
||||||
if [[ -n "$1" ]]; then
|
if [[ -n "$1" ]]; then
|
||||||
setup="$1"
|
setup="$1"
|
||||||
|
@ -11,7 +11,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Diplay menu to select type of server
|
# Diplay menu to select type of server
|
||||||
while ! [[ $setup -ge 0 && $setup -le 4 && $setup =~ ^[0-9]+$ ]] 2>/dev/null
|
while ! [[ ($setup -ge 0 && $setup -le 4 && $setup =~ ^[0-9]+$) || $setup == '-vbeta' ]] 2>/dev/null
|
||||||
do
|
do
|
||||||
echo ""
|
echo ""
|
||||||
echo " 1 - HTML Server"
|
echo " 1 - HTML Server"
|
||||||
|
@ -26,12 +26,20 @@ do
|
||||||
setup=${setup:-3}
|
setup=${setup:-3}
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [[ ! -d /opt/webinoly ]]; then
|
||||||
sudo mkdir /opt/webinoly
|
sudo mkdir /opt/webinoly
|
||||||
|
fi
|
||||||
|
|
||||||
# Download and install Webinoly
|
# Download and install Webinoly
|
||||||
# Same as app_install, but manually because is not installed yet.
|
if [[ $setup == '-vbeta' ]]; then
|
||||||
sudo curl -o $HOME/webinoly.tar -L https://qrok.es/wytar
|
echo ""
|
||||||
|
sudo wget --timeout=15 -qrO $HOME/webinoly.tar https://s3.amazonaws.com/dl.qrokes.com/webinoly/beta/webinoly.tar
|
||||||
|
echo "$(tput setaf 1)"
|
||||||
|
echo " [WARNING] You are installing a BETA version of Webinoly and it's not recommended for production enviroments. $(tput sgr0)"
|
||||||
|
else
|
||||||
|
sudo wget --timeout=15 -qrO $HOME/webinoly.tar https://qrok.es/wytar
|
||||||
|
fi
|
||||||
|
|
||||||
sudo tar -xf $HOME/webinoly.tar -C /opt/webinoly
|
sudo tar -xf $HOME/webinoly.tar -C /opt/webinoly
|
||||||
sudo find /opt/webinoly -type d -exec chmod 755 {} \;
|
sudo find /opt/webinoly -type d -exec chmod 755 {} \;
|
||||||
sudo find /opt/webinoly -type f -exec chmod 644 {} \;
|
sudo find /opt/webinoly -type f -exec chmod 644 {} \;
|
||||||
|
@ -54,6 +62,9 @@ else
|
||||||
tools_port $portools
|
tools_port $portools
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Write app version
|
||||||
|
conf_write app-version $webyversion
|
||||||
|
|
||||||
|
|
||||||
# NGINX Installation
|
# NGINX Installation
|
||||||
if [[ $setup -gt 0 && $setup != 4 ]]; then
|
if [[ $setup -gt 0 && $setup != 4 ]]; then
|
||||||
|
@ -76,8 +87,6 @@ if [ $setup == 4 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Write app version
|
|
||||||
webinoly_version
|
|
||||||
# Borrar archivos
|
# Borrar archivos
|
||||||
sudo rm $HOME/weby
|
sudo rm weby
|
||||||
app_purge
|
app_purge
|
||||||
|
|
Loading…
Reference in a new issue