Adding step infos
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
toolName=mytool
|
toolName="jitsi-meet"
|
||||||
|
|
||||||
# Get script working directory
|
# Get script working directory
|
||||||
# (when called from a different directory)
|
# (when called from a different directory)
|
||||||
@@ -20,7 +20,7 @@ WDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >>/dev/null 2>&1 && pwd )"
|
|||||||
#fi
|
#fi
|
||||||
#}
|
#}
|
||||||
|
|
||||||
step_1_info() { echo "Installation prerequisits"; }
|
step_1_info() { echo "Installation of prerequisits"; }
|
||||||
step_1_alias() { ALIAS="prepare"; }
|
step_1_alias() { ALIAS="prepare"; }
|
||||||
step_1() {
|
step_1() {
|
||||||
exe apt install gnupg2 git lsb-release ssl-cert ca-certificates apt-transport-https \
|
exe apt install gnupg2 git lsb-release ssl-cert ca-certificates apt-transport-https \
|
||||||
@@ -28,21 +28,25 @@ step_1() {
|
|||||||
curl ffmpeg ghostscript libfile-fcntllock-perl curl socat
|
curl ffmpeg ghostscript libfile-fcntllock-perl curl socat
|
||||||
}
|
}
|
||||||
|
|
||||||
|
step_2_info() { echo "Add universe and official nginx apt repositories"; }
|
||||||
step_2() {
|
step_2() {
|
||||||
apt-add-repository universe
|
apt-add-repository universe
|
||||||
exep "echo \"deb [arch=amd64] http://nginx.org/packages/mainline/ubuntu $(lsb_release -cs) nginx\" | tee /etc/apt/sources.list.d/nginx.list"
|
exep "echo \"deb [arch=amd64] http://nginx.org/packages/mainline/ubuntu $(lsb_release -cs) nginx\" | tee /etc/apt/sources.list.d/nginx.list"
|
||||||
exep "curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -"
|
exep "curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
step_3_info() { echo "Add official $toolName apt repository"; }
|
||||||
step_3() {
|
step_3() {
|
||||||
exep "echo \"deb https://download.jitsi.org stable/\" | tee /etc/apt/sources.list.d/jitsi.list"
|
exep "echo \"deb https://download.jitsi.org stable/\" | tee /etc/apt/sources.list.d/jitsi.list"
|
||||||
exep "wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | sudo apt-key add -"
|
exep "wget -qO - https://download.jitsi.org/jitsi-key.gpg.key | sudo apt-key add -"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
step_4_info() { echo "Upgrade system packages"; }
|
||||||
step_4() {
|
step_4() {
|
||||||
exe apt update && apt upgrade
|
exe apt update && apt upgrade
|
||||||
}
|
}
|
||||||
|
|
||||||
|
step_5_info() { echo "Install nginx webserver"; }
|
||||||
step_5_alias() { ALIAS="webserver"; }
|
step_5_alias() { ALIAS="webserver"; }
|
||||||
step_5() {
|
step_5() {
|
||||||
exe apt install nginx
|
exe apt install nginx
|
||||||
@@ -53,12 +57,14 @@ step_5() {
|
|||||||
exe systemctl enable nginx.service
|
exe systemctl enable nginx.service
|
||||||
}
|
}
|
||||||
|
|
||||||
|
step_6_info() { echo "Install ufw firewall"; }
|
||||||
step_6_alias() { ALIAS="firewall"; }
|
step_6_alias() { ALIAS="firewall"; }
|
||||||
step_6() {
|
step_6() {
|
||||||
exe apt install ufw
|
exe apt install ufw
|
||||||
endReturn -o $? "Installation of firewall ufw failed"
|
endReturn -o $? "Installation of firewall ufw failed"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
step_7_info() { echo "Setup ufw firewall to run $toolName"; }
|
||||||
step_7() {
|
step_7() {
|
||||||
echo " [I] Configure ufw firewall"
|
echo " [I] Configure ufw firewall"
|
||||||
exe ufw allow 22/tcp
|
exe ufw allow 22/tcp
|
||||||
@@ -69,25 +75,25 @@ step_7() {
|
|||||||
exe ufw logging medium && ufw default deny incoming && ufw enable && service ufw restart
|
exe ufw logging medium && ufw default deny incoming && ufw enable && service ufw restart
|
||||||
}
|
}
|
||||||
|
|
||||||
|
step_8_info() { echo "Install $toolName"; }
|
||||||
step_8_alias() { ALIAS="install"; }
|
step_8_alias() { ALIAS="install"; }
|
||||||
step_8() {
|
step_8() {
|
||||||
exe read -p "Make sure SSL certificates are available. Enter to continue"
|
exe read -p "Make sure SSL certificates are available. Enter to continue"
|
||||||
exe apt install jitsi-meet -y
|
exe apt install jitsi-meet -y
|
||||||
}
|
}
|
||||||
|
|
||||||
|
step_9_info() { echo "Move automatically generated $toolName virutal host to new configuration directory"; }
|
||||||
step_9() {
|
step_9() {
|
||||||
exe mv /etc/nginx/conf.d/default /etc/nginx/sites-available
|
|
||||||
exe mv /etc/nginx/sites-available/*.conf /etc/nginx/conf.d
|
exe mv /etc/nginx/sites-available/*.conf /etc/nginx/conf.d
|
||||||
|
exe mv /etc/nginx/conf.d/default /etc/nginx/sites-available
|
||||||
exe service nginx restart
|
exe service nginx restart
|
||||||
|
echo " [I] Check /etc/nginx/conf.d for unwanted configurations"
|
||||||
}
|
}
|
||||||
|
|
||||||
step_10_info() { echo "WIP post install tasks"; }
|
step_10_info() { echo "WIP post-install tasks"; }
|
||||||
step_10() {
|
step_10() {
|
||||||
echo " [I] Tasks to be automated"
|
echo " [I] Tasks to be automated"
|
||||||
echo
|
echo
|
||||||
echo " * Move nginx jitsi config to /etc/nginx/conf.d"
|
|
||||||
echo " New nginx version doesn't support sites-available / sites-enabled."
|
|
||||||
echo
|
|
||||||
echo " * Make jitsi installation password protected"
|
echo " * Make jitsi installation password protected"
|
||||||
echo " (https://github.com/jitsi/jicofo#secure-domain)"
|
echo " (https://github.com/jitsi/jicofo#secure-domain)"
|
||||||
echo " Creating new rooms will require username and password"
|
echo " Creating new rooms will require username and password"
|
||||||
@@ -128,6 +134,7 @@ step_10() {
|
|||||||
echo " [I] Use step \"restart\" after these changes"
|
echo " [I] Use step \"restart\" after these changes"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
step_20_info() { echo "Restart all $toolName components"; }
|
||||||
step_20_alias() { ALIAS="restart"; }
|
step_20_alias() { ALIAS="restart"; }
|
||||||
step_20() {
|
step_20() {
|
||||||
echo " [I] Restart jitsi-meet components"
|
echo " [I] Restart jitsi-meet components"
|
||||||
|
Reference in New Issue
Block a user