Move into apt-get

This commit is contained in:
Luis Guzmán 2020-04-14 11:49:11 -05:00
parent 1909adb669
commit b2a56c1d6a
3 changed files with 24 additions and 21 deletions

View File

@ -46,8 +46,8 @@ Adding Google Cloud SDK repository for latest updates
fi fi
} }
install_gc_repo install_gc_repo
apt -y update apt-get -q2 update
apt -y install google-cloud-sdk google-cloud-sdk-app-engine-java apt-get -y install google-cloud-sdk google-cloud-sdk-app-engine-java
echo "Please select one of the current options: echo "Please select one of the current options:
[1] I want to configure a new project, service account, billing and JSON credentials. [1] I want to configure a new project, service account, billing and JSON credentials.
@ -162,7 +162,7 @@ sleep 2
export GOOGLE_APPLICATION_CREDENTIALS=$GC_API_JSON export GOOGLE_APPLICATION_CREDENTIALS=$GC_API_JSON
echo "Installing Jigasi, your SIP credentials will be asked. (mandatory)" echo "Installing Jigasi, your SIP credentials will be asked. (mandatory)"
apt -y install jigasi apt-get -y install jigasi
cat << JIGASI_CONF >> $JIGASI_CONFIG cat << JIGASI_CONF >> $JIGASI_CONFIG

View File

@ -59,7 +59,7 @@ if [ "$(dpkg-query -W -f='${Status}' $1 2>/dev/null | grep -c "ok installed")" =
echo " $1 is installed, skipping..." echo " $1 is installed, skipping..."
else else
echo -e "\n---- Installing $1 ----" echo -e "\n---- Installing $1 ----"
apt -yqq install $1 apt-get -yq2 install $1
fi fi
} }
add_mariadb() { add_mariadb() {
@ -69,7 +69,7 @@ add_mariadb() {
echo "# Adding MariaDB $MDBVER repository" echo "# Adding MariaDB $MDBVER repository"
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C74CD1D8 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C74CD1D8
echo "deb [arch=amd64] http://ftp.ddg.lth.se/mariadb/repo/$MDBVER/ubuntu $DISTRO_RELEASE main" > /etc/apt/sources.list.d/mariadb.list echo "deb [arch=amd64] http://ftp.ddg.lth.se/mariadb/repo/$MDBVER/ubuntu $DISTRO_RELEASE main" > /etc/apt/sources.list.d/mariadb.list
apt update -qq apt-get update -q2
fi fi
} }
add_php74() { add_php74() {
@ -79,7 +79,7 @@ add_php74() {
echo "# Adding PHP $PHPVER Repository" echo "# Adding PHP $PHPVER Repository"
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com E5267A6C apt-key adv --recv-keys --keyserver keyserver.ubuntu.com E5267A6C
echo "deb [arch=amd64] http://ppa.launchpad.net/ondrej/php/ubuntu $DISTRO_RELEASE main" > /etc/apt/sources.list.d/php7x.list echo "deb [arch=amd64] http://ppa.launchpad.net/ondrej/php/ubuntu $DISTRO_RELEASE main" > /etc/apt/sources.list.d/php7x.list
apt update -qq apt-get update -q2
fi fi
} }
@ -92,7 +92,7 @@ install_ifnot mariadb-server-$MDBVER
# PHP 7.4 # PHP 7.4
add_php74 add_php74
apt install -y \ apt-get install -y \
php$PHPVER-fpm \ php$PHPVER-fpm \
php$PHPVER-bz2 \ php$PHPVER-bz2 \
php$PHPVER-curl \ php$PHPVER-curl \
@ -365,6 +365,9 @@ sed -i "/skeletondirectory/a \ \ \'simpleSignUpLink.shown\' => false," $NC_CONFI
sed -i "/simpleSignUpLink.shown/a \ \ \'knowledgebaseenabled\' => false," $NC_CONFIG sed -i "/simpleSignUpLink.shown/a \ \ \'knowledgebaseenabled\' => false," $NC_CONFIG
sed -i "s|http://localhost|http://$NC_DOMAIN|" $NC_CONFIG sed -i "s|http://localhost|http://$NC_DOMAIN|" $NC_CONFIG
echo "Add crontab..."
crontab -u www-data -l | { cat; echo "*/5 * * * * php -f $NC_PATH/cron.php"; } | crontab -u www-data -
echo " echo "
Add memcache support... Add memcache support...
" "

View File

@ -38,7 +38,7 @@ if [ "$(dpkg-query -W -f='${Status}' $1 2>/dev/null | grep -c "ok installed")" =
echo " $1 is installed, skipping..." echo " $1 is installed, skipping..."
else else
echo -e "\n---- Installing $1 ----" echo -e "\n---- Installing $1 ----"
apt -yqq install $1 apt-get -yq2 install $1
fi fi
} }
check_serv() { check_serv() {
@ -84,16 +84,16 @@ update_certbot() {
Cerbot repository already on the system! Cerbot repository already on the system!
Checking for updates... Checking for updates...
" "
apt -q2 update apt-get -q2 update
apt -yq2 dist-upgrade apt-get -yq2 dist-upgrade
else else
echo " echo "
Adding cerbot (formerly letsencrypt) PPA repository for latest updates Adding cerbot (formerly letsencrypt) PPA repository for latest updates
" "
echo "deb http://ppa.launchpad.net/certbot/certbot/ubuntu $DIST main" > /etc/apt/sources.list.d/certbot.list echo "deb http://ppa.launchpad.net/certbot/certbot/ubuntu $DIST main" > /etc/apt/sources.list.d/certbot.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 75BCA694 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 75BCA694
apt -qq update apt-get -q2 update
apt -yqq dist-upgrade apt-get -yq2 dist-upgrade
fi fi
} }
@ -145,10 +145,10 @@ fi
# Requirements # Requirements
echo "We'll start by installing system requirements this may take a while please be patient..." echo "We'll start by installing system requirements this may take a while please be patient..."
apt update -yq2 apt-get update -q2
apt dist-upgrade -yq2 apt-get dist-upgrade -yq2
apt -y install \ apt-get -y install \
bmon \ bmon \
curl \ curl \
ffmpeg \ ffmpeg \
@ -166,7 +166,7 @@ echo "
# Install Jitsi Framework # Install Jitsi Framework
#-------------------------------------------------- #--------------------------------------------------
" "
apt -y install \ apt-get -y install \
jitsi-meet \ jitsi-meet \
jibri \ jibri \
openjdk-8-jre-headless openjdk-8-jre-headless
@ -184,7 +184,7 @@ if [ "$(dpkg-query -W -f='${Status}' nodejs 2>/dev/null | grep -c "ok")" == "1"
echo "Nodejs is installed, skipping..." echo "Nodejs is installed, skipping..."
else else
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
apt install -yq2 nodejs apt-get install -yq2 nodejs
echo "Installing nodejs esprima package..." echo "Installing nodejs esprima package..."
npm install -g esprima npm install -g esprima
fi fi
@ -210,8 +210,8 @@ else
wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add -
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | tee $GOOGL_REPO echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | tee $GOOGL_REPO
fi fi
apt -qq update apt-get -q2 update
apt install -yq2 google-chrome-stable apt-get install -yq2 google-chrome-stable
rm -rf /etc/apt/sources.list.d/dl_google_com_linux_chrome_deb.list rm -rf /etc/apt/sources.list.d/dl_google_com_linux_chrome_deb.list
if [ -f /usr/local/bin/chromedriver ]; then if [ -f /usr/local/bin/chromedriver ]; then
@ -734,8 +734,8 @@ echo "
for customized support: http://switnet.net for customized support: http://switnet.net
######################################################################## ########################################################################
" "
apt -y autoremove apt-get -y autoremove
apt autoclean apt-get autoclean
echo "Rebooting in..." echo "Rebooting in..."
secs=$((15)) secs=$((15))