diff --git a/lib/install b/lib/install index 50c92ac..b75f035 100644 --- a/lib/install +++ b/lib/install @@ -1,9 +1,7 @@ #!/bin/bash source /opt/webinoly/lib/general -webinoly_version() { - conf_write app-version 1.0.1 -} + server_version() { 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 app_purge() { sudo rm $HOME/webinoly.tar diff --git a/lib/sites b/lib/sites index 62f8d79..491c4df 100644 --- a/lib/sites +++ b/lib/sites @@ -8,7 +8,7 @@ source /opt/webinoly/lib/general nginx_helper_plugin() { # 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 rm /var/www/$domain/htdocs/nginx-helper-plugin.zip echo "" @@ -37,7 +37,7 @@ wpinstall() { done # 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 mv /var/www/$domain/htdocs/wordpress/* /var/www/$domain/htdocs/ sudo rm -rf /var/www/$domain/htdocs/wordpress diff --git a/plugins/webinoly b/plugins/webinoly index 82a5fa8..39efe09 100644 --- a/plugins/webinoly +++ b/plugins/webinoly @@ -10,9 +10,11 @@ arg="$2" source /opt/webinoly/lib/install if [ "$opt" == "-update" ]; then - app_install - app_purge - webinoly_version + if [[ $arg == '-vbeta' ]]; then + sudo wget --timeout=15 -qrO weby https://s3.amazonaws.com/dl.qrokes.com/webinoly/beta/weby && sudo bash weby -vbeta + else + sudo wget --timeout=15 -qrO weby qrok.es/wy && sudo bash weby 0 + fi echo "" echo "${gre}Webinoly App has been updated successfully!${end}" elif [[ "$opt" == "-server-update" || "$opt" == "-server-reset" ]]; then diff --git a/weby b/weby index fde8c01..a46ca51 100644 --- a/weby +++ b/weby @@ -2,7 +2,7 @@ # Webinoly script. # This script is designed to install latest Webinoly. - +webyversion="1.0.2beta" if [[ -n "$1" ]]; then setup="$1" @@ -11,7 +11,7 @@ else fi # 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 echo "" echo " 1 - HTML Server" @@ -26,12 +26,20 @@ do setup=${setup:-3} done - -sudo mkdir /opt/webinoly +if [[ ! -d /opt/webinoly ]]; then + sudo mkdir /opt/webinoly +fi # Download and install Webinoly -# Same as app_install, but manually because is not installed yet. -sudo curl -o $HOME/webinoly.tar -L https://qrok.es/wytar +if [[ $setup == '-vbeta' ]]; then + 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 find /opt/webinoly -type d -exec chmod 755 {} \; sudo find /opt/webinoly -type f -exec chmod 644 {} \; @@ -54,6 +62,9 @@ else tools_port $portools fi +# Write app version +conf_write app-version $webyversion + # NGINX Installation if [[ $setup -gt 0 && $setup != 4 ]]; then @@ -76,8 +87,6 @@ if [ $setup == 4 ]; then fi -# Write app version -webinoly_version # Borrar archivos -sudo rm $HOME/weby +sudo rm weby app_purge