Inital commit
This commit is contained in:
105
Install-JIB.sh
Normal file
105
Install-JIB.sh
Normal file
@@ -0,0 +1,105 @@
|
||||
#######################
|
||||
# JitsiMeet - JIB #
|
||||
#######################
|
||||
if [ ! -f "~/jistiMeet.var" ] ; then echo 'Please put "/etc/ICTM/JitsiMeet.var" from main server in "~/jistiMeet.var"' && exit ; fi
|
||||
source ~/jistiMeet.var
|
||||
|
||||
##-----------------##
|
||||
# Defining Vars #
|
||||
##-----------------##
|
||||
OUTPUT='/dev/tty'
|
||||
|
||||
#PackageManager-config
|
||||
|
||||
dist_ver=$(grep --color=never -Po "^VERSION_ID=\K.*" "/etc/os-release")
|
||||
dist=$(grep --color=never -Po "^ID=\K.*" "/etc/os-release")
|
||||
|
||||
if [[ "${dist}" == *"debian"* ]] && [[ "${dist_ver}" == *"10"* ]]; then
|
||||
PKGM="apt"
|
||||
PKGI="${PKGM} install -y --no-install-recommends"
|
||||
PKGLIST="apt"
|
||||
shortdist=deb10
|
||||
else
|
||||
echo "This os in not supported"
|
||||
exit
|
||||
fi
|
||||
|
||||
unset dist_ver dist APTMODE
|
||||
|
||||
#Repo Vars
|
||||
repo=https://git.ictmaatwerk.com/VPS-scripts/MeetServer
|
||||
branch=main/JIB
|
||||
branchtype=branch
|
||||
|
||||
#SelfBuilding Vars
|
||||
mtype=""$repo"/raw/"$branchtype"/"$branch""
|
||||
|
||||
|
||||
##---------------##
|
||||
# Functions #
|
||||
##---------------##
|
||||
|
||||
msg () {
|
||||
echo "$1"
|
||||
}
|
||||
|
||||
##--------------------------##
|
||||
# Installer-Requirements #
|
||||
##--------------------------##
|
||||
|
||||
msg " Starting installer" 8 78
|
||||
$PKGM update > $OUTPUT 2>&1
|
||||
$PKGI curl > $OUTPUT 2>&1
|
||||
|
||||
##----------##
|
||||
# Menu #
|
||||
##----------##
|
||||
read -p 'Instance name (ex: jib1): ' jibinstid
|
||||
|
||||
##-------------------------##
|
||||
# Generating APT list #
|
||||
##-------------------------##
|
||||
#General aptList
|
||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$mtype"/generic.pkg.list; then
|
||||
curl "$mtype"/generic.pkg.list >>/tmp/pkg.list
|
||||
fi
|
||||
|
||||
##--------------------##
|
||||
# Pre-Requirements #
|
||||
##--------------------##
|
||||
|
||||
msg " Preconfiguring"
|
||||
curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=init osrel=$shortdist bash > $OUTPUT 2>&1
|
||||
$PKGM update
|
||||
$PKGM upgrade -y
|
||||
|
||||
|
||||
##-------------------##
|
||||
# Pre-configuring #
|
||||
##-------------------##
|
||||
|
||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$mtype"/preconf.sh; then
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$mtype"/preconf.sh)
|
||||
fi
|
||||
|
||||
##-------------##
|
||||
# Installer #
|
||||
##-------------##
|
||||
|
||||
$PKGM update
|
||||
cat /tmp/pkg.list | xargs $PKGI
|
||||
|
||||
|
||||
##---------------##
|
||||
# Configuring #
|
||||
##---------------##
|
||||
|
||||
if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$mtype"/conf.sh; then
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$mtype"/conf.sh)
|
||||
fi
|
||||
|
||||
##-------##
|
||||
# end #
|
||||
##-------##
|
||||
|
||||
msg " Done!"
|
||||
Reference in New Issue
Block a user