Add Ubuntu 18.04 support to GP branch
Add Ubuntu 18.04 support to GP branch
This commit is contained in:
commit
7f5327fe42
|
@ -16,7 +16,7 @@ Webinoly provides a set of tools and commands that facilitate the web server adm
|
||||||
- Log viewer in real time.
|
- Log viewer in real time.
|
||||||
|
|
||||||
### Requirements
|
### Requirements
|
||||||
* Ubuntu 16.04
|
* Ubuntu 16.04 or 18.04
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ db_delete() {
|
||||||
check_osname() {
|
check_osname() {
|
||||||
local distr=`echo $(lsb_release -i | cut -d':' -f 2)`
|
local distr=`echo $(lsb_release -i | cut -d':' -f 2)`
|
||||||
local osver=`echo $(lsb_release -c | cut -d':' -f 2)`
|
local osver=`echo $(lsb_release -c | cut -d':' -f 2)`
|
||||||
if ! [[ $distr == "Ubuntu" && $osver =~ ^(trusty|xenial|zesty|artful)$ ]]; then
|
if ! [[ $distr == "Ubuntu" && $osver =~ ^(trusty|xenial|zesty|artful|bionic)$ ]]; then
|
||||||
echo "${red}" >&2
|
echo "${red}" >&2
|
||||||
echo "****************************************************************************" >&2
|
echo "****************************************************************************" >&2
|
||||||
echo "**** This OS is not supported by Webinoly and could not work properly ****" >&2
|
echo "**** This OS is not supported by Webinoly and could not work properly ****" >&2
|
||||||
|
@ -137,7 +137,7 @@ mysql_client_install() {
|
||||||
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
|
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
|
||||||
sudo add-apt-repository "deb [arch=amd64,i386,ppc64el] http://mirrors.syringanetworks.net/mariadb/repo/10.2/ubuntu $osname main"
|
sudo add-apt-repository "deb [arch=amd64,i386,ppc64el] http://mirrors.syringanetworks.net/mariadb/repo/10.2/ubuntu $osname main"
|
||||||
;;
|
;;
|
||||||
"xenial"|"zesty"|"artful")
|
"xenial"|"zesty"|"artful"|"bionic")
|
||||||
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
|
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
|
||||||
sudo add-apt-repository "deb [arch=amd64,i386,ppc64el] http://mirrors.syringanetworks.net/mariadb/repo/10.2/ubuntu $osname main"
|
sudo add-apt-repository "deb [arch=amd64,i386,ppc64el] http://mirrors.syringanetworks.net/mariadb/repo/10.2/ubuntu $osname main"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -464,6 +464,7 @@ swap_create() {
|
||||||
swapkb=$(grep SwapTotal /proc/meminfo | cut -f 2 -d ':' | tr -d ' ' | cut -f 1 -d 'k')
|
swapkb=$(grep SwapTotal /proc/meminfo | cut -f 2 -d ':' | tr -d ' ' | cut -f 1 -d 'k')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# https://help.ubuntu.com/community/SwapFaq
|
||||||
if [[ -z $swapkb || $swapkb == "0" ]]; then
|
if [[ -z $swapkb || $swapkb == "0" ]]; then
|
||||||
api_update in5
|
api_update in5
|
||||||
if [[ -n $(conf_read swap-mem) && $(conf_read swap-mem) =~ ^[0-9]+$ ]]; then
|
if [[ -n $(conf_read swap-mem) && $(conf_read swap-mem) =~ ^[0-9]+$ ]]; then
|
||||||
|
@ -484,6 +485,8 @@ swap_create() {
|
||||||
local newswap="8"
|
local newswap="8"
|
||||||
elif [[ $ram -le 128 ]]; then
|
elif [[ $ram -le 128 ]]; then
|
||||||
local newswap="11"
|
local newswap="11"
|
||||||
|
elif [[ $ram -gt 128 ]]; then
|
||||||
|
local newswap="15"
|
||||||
else
|
else
|
||||||
local newswap="0"
|
local newswap="0"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -205,8 +205,10 @@ elif [[ $arg == "-purge" && $opt == "-mysql" ]]; then
|
||||||
conf_delete delautopma
|
conf_delete delautopma
|
||||||
fi
|
fi
|
||||||
sudo service mysql stop
|
sudo service mysql stop
|
||||||
sudo apt-get -y purge mariadb-server mariadb-common mysql-common debconf-utils
|
echo "mariadb-server-10.2 mariadb-server-10.2/postrm_remove_databases boolean true" | debconf-set-selections
|
||||||
|
sudo apt-get -y purge mariadb-server mariadb-common mysql-common
|
||||||
sudo apt-get -y purge mariadb-client
|
sudo apt-get -y purge mariadb-client
|
||||||
|
sudo apt-get -y purge debconf-utils
|
||||||
sudo apt-get -y autoremove
|
sudo apt-get -y autoremove
|
||||||
|
|
||||||
os_name=$(check_osname)
|
os_name=$(check_osname)
|
||||||
|
@ -216,7 +218,7 @@ elif [[ $arg == "-purge" && $opt == "-mysql" ]]; then
|
||||||
"trusty")
|
"trusty")
|
||||||
sudo apt-key del 0xcbcb082a1bb943db
|
sudo apt-key del 0xcbcb082a1bb943db
|
||||||
;;
|
;;
|
||||||
"xenial"|"zesty"|"artful")
|
"xenial"|"zesty"|"artful"|"bionic")
|
||||||
sudo apt-key del 0xF1656F24C74CD1D8
|
sudo apt-key del 0xF1656F24C74CD1D8
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
21
weby
21
weby
|
@ -7,7 +7,7 @@ webyversion="1.5.0-beta"
|
||||||
# Check OS support
|
# Check OS support
|
||||||
distr=`echo $(lsb_release -i | cut -d':' -f 2)`
|
distr=`echo $(lsb_release -i | cut -d':' -f 2)`
|
||||||
osver=`echo $(lsb_release -c | cut -d':' -f 2)`
|
osver=`echo $(lsb_release -c | cut -d':' -f 2)`
|
||||||
if ! [[ $distr == "Ubuntu" && $osver =~ ^(xenial)$ ]]; then
|
if ! [[ $distr == "Ubuntu" && $osver =~ ^(xenial|bionic)$ ]]; then
|
||||||
echo "$(tput setaf 1)"
|
echo "$(tput setaf 1)"
|
||||||
echo "****************************************************************************"
|
echo "****************************************************************************"
|
||||||
echo "**** This OS is not supported by Webinoly and could not work properly ****"
|
echo "**** This OS is not supported by Webinoly and could not work properly ****"
|
||||||
|
@ -77,6 +77,7 @@ if [[ -a /opt/webinoly/webinoly.conf ]]; then
|
||||||
echo "${gre}Webinoly Configuration file was found, so we will use it!${end}"
|
echo "${gre}Webinoly Configuration file was found, so we will use it!${end}"
|
||||||
else
|
else
|
||||||
[[ -n $2 && $2 != "-ver="* ]] && tools_port $2
|
[[ -n $2 && $2 != "-ver="* ]] && tools_port $2
|
||||||
|
newinst="true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Write app version
|
# Write app version
|
||||||
|
@ -92,6 +93,24 @@ if [[ $setup == 4 ]]; then
|
||||||
config_load
|
config_load
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Message Center
|
||||||
|
if [[ $newinst == "true" && $setup == 0 ]]; then
|
||||||
|
echo "${blu}You have chosen the option '0', it means that you have to manually build your own stack."
|
||||||
|
echo "But, don't worry! With Webinoly this is an easy task, just use the stack command, i.e. 'sudo stack -lemp'"
|
||||||
|
echo "${gre}"
|
||||||
|
echo "Webinoly has been successfully installed!!!"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "${blu}"
|
||||||
|
echo "****************************************************************************"
|
||||||
|
echo "********************** D O N A T I O N S ***************************"
|
||||||
|
echo "*** If you like Webinoly, buy me a coffee or a beer to show support. ***"
|
||||||
|
echo "************ PayPal: https://www.paypal.me/qrokes ******************"
|
||||||
|
echo "****************************************************************************"
|
||||||
|
echo "${end}"
|
||||||
|
|
||||||
|
|
||||||
# Remove Installation File
|
# Remove Installation File
|
||||||
sudo rm weby
|
sudo rm weby
|
||||||
app_purge
|
app_purge
|
||||||
|
|
Loading…
Reference in a new issue