bbb-pre-install.sh: some minor fixes..
This commit is contained in:
parent
529a56266b
commit
42e52f1cb1
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
cript_name="$(basename $(realpath $0))"
|
script_name="$(basename $(realpath $0))"
|
||||||
working_dir="$(dirname $(realpath $0))"
|
working_dir="$(dirname $(realpath $0))"
|
||||||
|
|
||||||
conf_file="${working_dir}/conf/${script_name%%.*}.conf"
|
conf_file="${working_dir}/conf/${script_name%%.*}.conf"
|
||||||
@ -11,9 +11,6 @@ log_file="${LOCK_DIR}/${script_name%%.*}.log"
|
|||||||
DIST="ubuntu"
|
DIST="ubuntu"
|
||||||
DIST_RELEASE="xenial"
|
DIST_RELEASE="xenial"
|
||||||
|
|
||||||
FQDN_HOSTNAME="bbb.oopen.de"
|
|
||||||
HOSTNAME="${FQDN_HOSTNAME%%.*}"
|
|
||||||
|
|
||||||
|
|
||||||
# ----------
|
# ----------
|
||||||
# Base Function(s)
|
# Base Function(s)
|
||||||
@ -142,6 +139,52 @@ if $terminal ; then
|
|||||||
echo -e "\033[1m----------\033[m"
|
echo -e "\033[1m----------\033[m"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
FQDN_HOSTNAME=
|
||||||
|
echo ""
|
||||||
|
echo -e "\033[32m--\033[m"
|
||||||
|
echo ""
|
||||||
|
echo "Insert full qualified hostname for BigBlueButton Service"
|
||||||
|
echo ""
|
||||||
|
if [[ -n "$_FQDN_HOSTNAME" ]]; then
|
||||||
|
echononl "Full qualified hostname [${_FQDN_HOSTNAME}]: "
|
||||||
|
read FQDN_HOSTNAME
|
||||||
|
if [[ "X${FQDN_HOSTNAME}" = "X" ]]; then
|
||||||
|
FQDN_HOSTNAME=$_FQDN_HOSTNAME
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
while [[ "X${FQDN_HOSTNAME}" = "X" ]]; do
|
||||||
|
echononl "Full qualified hostname: "
|
||||||
|
read FQDN_HOSTNAME
|
||||||
|
if [[ "X${FQDN_HOSTNAME}" = "X" ]]; then
|
||||||
|
echo -e "\n\t\033[33m\033[1mFull qualified hostname is reqired\033[m\n"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
HOSTNAME="${FQDN_HOSTNAME%%.*}"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo -e "\t\033[32mStart pre-install script for BigBlueButton Service with the following parameters\033[m"
|
||||||
|
echo ""
|
||||||
|
echo -e "\tFull qualified Hostname..: $FQDN_HOSTNAME"
|
||||||
|
echo -e "\tHostname.................: $HOSTNAME"
|
||||||
|
echo ""
|
||||||
|
echononl "einverstanden (yes/no): "
|
||||||
|
read OK
|
||||||
|
OK=${OK,,}
|
||||||
|
while [ "X$OK" != "Xyes" -a "X$OK" != "Xno" ]; do
|
||||||
|
echononl "Wrong entry! [yes/no]: "
|
||||||
|
read OK
|
||||||
|
OK=${OK,,}
|
||||||
|
done
|
||||||
|
[ $OK = "yes" ] || fatal Repeat with other settings..
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# /etc/resolf.conf
|
# /etc/resolf.conf
|
||||||
#
|
#
|
||||||
@ -214,7 +257,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echononl "Upgrade System.."
|
echononl "Upgrade System.."
|
||||||
apt-get dist-upgrade > "$log_file" 2>&1
|
apt-get --yes dist-upgrade > "$log_file" 2>&1
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo_failed
|
echo_failed
|
||||||
error "$(cat "$log_file")"
|
error "$(cat "$log_file")"
|
||||||
@ -226,9 +269,9 @@ blank_line
|
|||||||
|
|
||||||
|
|
||||||
# Set the locale of the server to 'en_US.UTF-8'.
|
# Set the locale of the server to 'en_US.UTF-8'.
|
||||||
#
|
|
||||||
echononl "Install 'language-pack-en'.."
|
echononl "Install 'language-pack-en'.."
|
||||||
apt-get install language-pack-en > "$log_file" 2>&1
|
apt-get install --yes language-pack-en > "$log_file" 2>&1
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo_failed
|
echo_failed
|
||||||
error "$(cat "$log_file")"
|
error "$(cat "$log_file")"
|
||||||
@ -260,7 +303,7 @@ blank_line
|
|||||||
# BigBlueButton’s components, such as Tomcat, need a source of entropy when starting up.
|
# BigBlueButton’s components, such as Tomcat, need a source of entropy when starting up.
|
||||||
#
|
#
|
||||||
echononl "Install 'haveged'.."
|
echononl "Install 'haveged'.."
|
||||||
apt-get install haveged > "$log_file" 2>&1
|
apt-get install --yes haveged > "$log_file" 2>&1
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo_failed
|
echo_failed
|
||||||
error "$(cat "$log_file")"
|
error "$(cat "$log_file")"
|
||||||
@ -269,7 +312,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echononl "Install 'software-properties-common'.."
|
echononl "Install 'software-properties-common'.."
|
||||||
apt-get install software-properties-common -y > "$log_file" 2>&1
|
apt-get install --yes software-properties-common -y > "$log_file" 2>&1
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo_failed
|
echo_failed
|
||||||
error "$(cat "$log_file")"
|
error "$(cat "$log_file")"
|
||||||
@ -314,7 +357,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echononl "Upgrade System.."
|
echononl "Upgrade System.."
|
||||||
apt-get dist-upgrade > "$log_file" 2>&1
|
apt-get --yes dist-upgrade > "$log_file" 2>&1
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo_failed
|
echo_failed
|
||||||
error "$(cat "$log_file")"
|
error "$(cat "$log_file")"
|
||||||
|
Loading…
Reference in New Issue
Block a user