pre-packs and ppa remove
Basic packages are now installed before stack. Redis PPA, MariaDB apt-key should be removed when purge or uninstall.
This commit is contained in:
parent
ed9b5b2841
commit
c0d3752235
12
lib/general
12
lib/general
|
@ -83,6 +83,16 @@ check_osname() {
|
|||
}
|
||||
|
||||
|
||||
pre_install() {
|
||||
sudo apt-get -qq update
|
||||
if [[ $(conf_read pre-packs) != true ]]; then
|
||||
# Check for missing essential packages
|
||||
sudo apt-get -y -qq install software-properties-common python-software-properties pwgen unzip
|
||||
conf_write pre-packs true
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
mysql_client_install() {
|
||||
local osname=$(check_osname)
|
||||
# Cases with MariaDB v10.2 support
|
||||
|
@ -95,7 +105,7 @@ mysql_client_install() {
|
|||
;;
|
||||
esac
|
||||
sudo add-apt-repository "deb [arch=amd64,i386,ppc64el] http://mirrors.syringanetworks.net/mariadb/repo/10.2/ubuntu $osname main"
|
||||
sudo apt-get update
|
||||
pre_install
|
||||
sudo apt-get -y install mariadb-client
|
||||
conf_write mysql-client true
|
||||
echo "${gre}MySQL Client has been successfully installed!${end}"
|
||||
|
|
10
lib/install
10
lib/install
|
@ -112,7 +112,7 @@ messagend_install() {
|
|||
|
||||
nginx_install() {
|
||||
echo | sudo add-apt-repository ppa:nginx/stable
|
||||
sudo apt-get update
|
||||
pre_install
|
||||
sudo apt-get -y install nginx
|
||||
|
||||
if [[ $(conf_read login-www-data) == "true" ]]; then
|
||||
|
@ -136,7 +136,7 @@ php_install() {
|
|||
# Fix ondrej issue - https://github.com/oerdnj/deb.sury.org/issues/56
|
||||
sudo apt-get install -y language-pack-en-base
|
||||
sudo LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
|
||||
sudo apt-get update
|
||||
pre_install
|
||||
sudo apt-get -y install php${ver}-fpm php${ver}-curl php${ver}-gd php${ver}-imap php${ver}-mcrypt php${ver}-readline php${ver}-common php${ver}-recode php${ver}-mysql php${ver}-cli php${ver}-mbstring php${ver}-bcmath php${ver}-mysql php${ver}-opcache php${ver}-zip php${ver}-xml php-imagick graphviz php-pear php-xdebug php-msgpack php${ver}-soap
|
||||
|
||||
sudo cp /etc/php/$(conf_read php-ver)/fpm/php.ini /opt/webinoly/templates/source/
|
||||
|
@ -152,6 +152,7 @@ mysql_install() {
|
|||
mysql_client_install
|
||||
fi
|
||||
|
||||
pre_install
|
||||
# debconf-utils for unattended scripts
|
||||
# debconf-get-selections | grep phpmyadmin <<-- list conf variables
|
||||
sudo apt-get -y install debconf-utils
|
||||
|
@ -290,7 +291,7 @@ nginx_tool() {
|
|||
fi
|
||||
|
||||
# Instalar Duply & Duplicity
|
||||
sudo apt-get update
|
||||
pre_install
|
||||
sudo apt-get -y install python-boto duplicity duply
|
||||
|
||||
# Install LetsEncrypt
|
||||
|
@ -325,7 +326,7 @@ php_tool() {
|
|||
|
||||
# Redis (Object Cache)
|
||||
echo | sudo add-apt-repository ppa:chris-lea/redis-server
|
||||
sudo apt-get update
|
||||
pre_install
|
||||
sudo apt-get -y install redis-server php-redis
|
||||
|
||||
# Memcached (Object Cache)
|
||||
|
@ -350,6 +351,7 @@ mysql_tool() {
|
|||
echo "phpmyadmin phpmyadmin/app-password-confirm password $AUTOGENPASS_PMA" | debconf-set-selections
|
||||
|
||||
#PhpMyAdmin Installation
|
||||
pre_install
|
||||
sudo apt-get -y install phpmyadmin
|
||||
|
||||
if [[ -d /usr/share/phpmyadmin ]]; then
|
||||
|
|
|
@ -124,6 +124,7 @@ elif [[ $arg == "-purge" && $opt == "-php" ]]; then
|
|||
sudo apt-get -y purge php-memcached php-memcache memcached
|
||||
sudo apt-get -y purge redis-server php-redis postfix
|
||||
echo | sudo add-apt-repository --remove 'ppa:ondrej/php'
|
||||
echo | sudo add-apt-repository --remove 'ppa:chris-lea/redis-server'
|
||||
sudo apt-get -y autoremove
|
||||
sudo rm -rf /etc/php
|
||||
sudo rm /opt/webinoly/templates/source/*
|
||||
|
@ -176,7 +177,19 @@ elif [[ $arg == "-purge" && $opt == "-mysql" ]]; then
|
|||
sudo apt-get -y purge mariadb-server mariadb-common mysql-common debconf-utils
|
||||
sudo apt-get -y purge mariadb-client
|
||||
sudo apt-get -y autoremove
|
||||
sudo add-apt-repository --remove "deb [arch=amd64,i386,ppc64el] http://mirrors.syringanetworks.net/mariadb/repo/10.2/ubuntu $(check_osname) main"
|
||||
|
||||
os_name=$(check_osname)
|
||||
sudo add-apt-repository --remove "deb [arch=amd64,i386,ppc64el] http://mirrors.syringanetworks.net/mariadb/repo/10.2/ubuntu ${os_name} main"
|
||||
# Cases with MariaDB v10.2 support
|
||||
case "$os_name" in
|
||||
"trusty")
|
||||
sudo apt-key del 0xcbcb082a1bb943db
|
||||
;;
|
||||
"xenial"|"zesty"|"artful")
|
||||
sudo apt-key del 0xF1656F24C74CD1D8
|
||||
;;
|
||||
esac
|
||||
|
||||
sudo rm -rf /etc/mysql
|
||||
sudo rm -rf /var/lib/mysql
|
||||
conf_delete mysql-root
|
||||
|
|
|
@ -199,6 +199,11 @@ elif [ "$opt" == "-uninstall" ]; then
|
|||
if [[ $(conf_read linux-optim) == "purged" ]]; then
|
||||
swap_delete
|
||||
fi
|
||||
if [[ $(conf_read pre-packs) == true ]]; then
|
||||
sudo apt-get -y -qq purge pwgen unzip
|
||||
sudo apt-get -y -qq autoremove
|
||||
conf_write pre-packs purged
|
||||
fi
|
||||
sudo rm -rf /opt/webinoly
|
||||
sudo rm /usr/bin/webinoly
|
||||
sudo rm /usr/bin/stack
|
||||
|
|
6
weby
6
weby
|
@ -2,7 +2,7 @@
|
|||
|
||||
# Webinoly script.
|
||||
# This script is designed to install latest Webinoly.
|
||||
webyversion="1.1.0-beta"
|
||||
webyversion="1.1.0"
|
||||
|
||||
|
||||
# Check OS support
|
||||
|
@ -79,10 +79,6 @@ fi
|
|||
# Write app version
|
||||
conf_write app-version $webyversion
|
||||
|
||||
# Check for missing essential packages
|
||||
sudo apt-get -qq update
|
||||
sudo apt-get -y -qq install software-properties-common python-software-properties pwgen unzip
|
||||
|
||||
|
||||
# NGINX Installation
|
||||
if [[ $setup -gt 0 && $setup != 4 ]]; then
|
||||
|
|
Loading…
Reference in a new issue