Update to install version 2.3

This commit is contained in:
2021-05-28 02:27:57 +02:00
parent 2cac76f6e0
commit 4d6a4575dc
7 changed files with 1702 additions and 442 deletions

View File

@@ -254,42 +254,6 @@ echo ""
echo ""
# /etc/resolf.conf
#
#echononl "Remove symlink '/etc/resolv.conf'.."
#if [[ -h "/etc/resolv.conf" ]]; then
# rm /etc/resolv.conf > $log_file 2>&1
# if [[ $? -ne 0 ]]; then
# echo_failed
# error "$(cat "$log_file")"
# else
# echo_ok
# fi
#else
# echo_skipped
#fi
#
#echononl "Create new file '/etc/resolv.conf'.."
#cat <<EOF > /etc/resolv.conf 2> $log_file
#### Hetzner Online GmbH installimage
## nameserver config
#nameserver 213.133.100.100
#nameserver 213.133.98.98
#nameserver 213.133.99.99
#nameserver 2a01:4f8:0:1::add:9898
#nameserver 2a01:4f8:0:1::add:1010
#nameserver 2a01:4f8:0:1::add:9999
#EOF
#if [[ $? -ne 0 ]]; then
# echo_failed
# error "$(cat "$log_file")"
#else
# echo_ok
#fi
echononl "Set FQDN hostname (IPv4).."
perl -i -n -p -e "s/^127\.0\.1\.1.*/127.0.1.1 $FQDN_HOSTNAME $HOSTNAME/" /etc/hosts > "$log_file" 2>&1
if [[ $? -ne 0 ]]; then
@@ -341,12 +305,16 @@ blank_line
# Set the locale of the server to 'en_US.UTF-8'.
echononl "Install 'language-pack-en'.."
apt-get install --yes language-pack-en > "$log_file" 2>&1
if [[ $? -ne 0 ]]; then
echo_failed
error "$(cat "$log_file")"
if $(dpkg -s language-pack-en > /dev/null 2>&1 ) ; then
echo_skipped
else
echo_ok
apt-get install --yes language-pack-en > "$log_file" 2>&1
if [[ $? -ne 0 ]]; then
echo_failed
error "$(cat "$log_file")"
else
echo_ok
fi
fi
echononl "Set the locale of the server to 'en_US.UTF-8'.."
@@ -373,197 +341,30 @@ blank_line
# BigBlueButtons components, such as Tomcat, need a source of entropy when starting up.
#
echononl "Install 'haveged'.."
apt-get install --yes haveged > "$log_file" 2>&1
if [[ $? -ne 0 ]]; then
echo_failed
error "$(cat "$log_file")"
if $(dpkg -s haveged > /dev/null 2>&1 ) ; then
echo_skipped
else
echo_ok
apt-get install --yes haveged > "$log_file" 2>&1
if [[ $? -ne 0 ]]; then
echo_failed
error "$(cat "$log_file")"
else
echo_ok
fi
fi
echononl "Install 'software-properties-common'.."
apt-get install --yes software-properties-common -y > "$log_file" 2>&1
if [[ $? -ne 0 ]]; then
echo_failed
error "$(cat "$log_file")"
echononl "Install 'apt-utils'.."
if $(dpkg -s apt-utils > /dev/null 2>&1 ) ; then
echo_skipped
else
echo_ok
apt-get install --yes apt-utils > "$log_file" 2>&1
if [[ $? -ne 0 ]]; then
echo_failed
error "$(cat "$log_file")"
else
echo_ok
fi
fi
blank_line
# Add reposototies for 'ffmpeg' (create recordings) and 'yq' (update YAML files)
#
# Note:
# The default version of ffmpeg in Ubuntu 16.04 is old and yq does not exist
# in the default repositories
#
echononl "Add repository for 'ffmpeg' .."
add-apt-repository ppa:bigbluebutton/support -y > "$log_file" 2>&1
if [[ $? -ne 0 ]]; then
echo_failed
error "$(cat "$log_file")"
else
echo_ok
fi
echononl "Add repository for 'yq'.."
add-apt-repository ppa:rmescandon/yq -y > "$log_file" 2>&1
if [[ $? -ne 0 ]]; then
echo_failed
error "$(cat "$log_file")"
else
echo_ok
fi
echononl "Update repositories.."
apt-get update > "$log_file" 2>&1
if [[ $? -ne 0 ]]; then
echo_failed
error "$(cat "$log_file")"
else
echo_ok
fi
echononl "Upgrade System.."
apt-get --yes dist-upgrade > "$log_file" 2>&1
if [[ $? -ne 0 ]]; then
echo_failed
error "$(cat "$log_file")"
else
echo_ok
fi
blank_line
# add repository for mongodb
#
echononl "Add apt key for 'mongodb' repository.."
wget -qO - https://www.mongodb.org/static/pgp/server-3.4.asc | sudo apt-key add - > "$log_file" 2>&1
if [[ $? -ne 0 ]]; then
echo_failed
error "$(cat "$log_file")"
else
echo_ok
fi
echononl "Add repository for 'mongodb'.."
cat <<EOF > /etc/apt/sources.list.d/mongodb-org-3.4.list 2> "$log_file"
deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu ${DIST_CODENAME}/mongodb-org/3.4 multiverse
EOF
if [[ $? -ne 0 ]]; then
echo_failed
error "$(cat "$log_file")"
else
echo_ok
fi
echononl "Update repositories.."
apt-get update > "$log_file" 2>&1
if [[ $? -ne 0 ]]; then
echo_failed
error "$(cat "$log_file")"
else
echo_ok
fi
echononl "Install mongo-db and curl .."
apt-get install -y mongodb-org curl > "$log_file" 2>&1
if [[ $? -ne 0 ]]; then
echo_failed
error "$(cat "$log_file")"
else
echo_ok
fi
blank_line
# install nodejs
#
echononl "Trigger script to install the NodeSource Node.js 8.x LTS Carbon repo.."
echo_wait
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - > "$log_file" 2>&1
if [[ $? -ne 0 ]]; then
echo_failed
error "$(cat "$log_file")"
else
echo_ok
fi
echononl "Install nodejs.."
apt-get install -y nodejs > "$log_file" 2>&1
if [[ $? -ne 0 ]]; then
echo_failed
error "$(cat "$log_file")"
else
echo_ok
fi
# apt-get key for BigBlueButton repository
#
echononl "Add apt key for BigBlueButton repository.."
wget https://ubuntu.bigbluebutton.org/repo/bigbluebutton.asc -O- 2> "$log_file" | sudo apt-key add - > "$log_file" 2>&1
if [[ $? -ne 0 ]]; then
echo_failed
error "$(cat "$log_file")"
else
echo_ok
fi
# add the repository for BigBlueButton 2.2 packages
#
echononl "Add repository for BigBlueButton 2.2 packages.."
cat <<EOF > /etc/apt/sources.list.d/bigbluebutton.list 2> "$log_file"
deb https://ubuntu.bigbluebutton.org/${DIST_CODENAME}-220/ bigbluebutton-${DIST_CODENAME} main
EOF
if [[ $? -ne 0 ]]; then
echo_failed
error "$(cat "$log_file")"
else
echo_ok
fi
echononl "Update repositories.."
apt-get update > "$log_file" 2>&1
if [[ $? -ne 0 ]]; then
echo_failed
error "$(cat "$log_file")"
else
echo_ok
fi
blank_line
# Create 'override'-directory for service 'redis-server'
#
echononl "Create 'override'-directory for service 'redis-server'.."
if [[ -d "/etc/systemd/system/redis-server.service.d" ]] ; then
echo_skipped
else
mkdir /etc/systemd/system/redis-server.service.d
if [[ $? -ne 0 ]]; then
echo_failed
error "$(cat "$log_file")"
else
echo_ok
fi
fi
echononl "Create 'override'-file for service 'redis-server'.."
cat <<EOF > /etc/systemd/system/redis-server.service.d/override.conf 2> "$log_file"
[Service]
PrivateDevices=no
EOF
if [[ $? -ne 0 ]]; then
echo_failed
error "$(cat "$log_file")"
else
echo_ok
fi
clean_up 0