diff --git a/README.md b/README.md index 7de40c4..73fe61d 100644 --- a/README.md +++ b/README.md @@ -9,13 +9,13 @@ A quick install guide & scripts for installing FusionPBX. It is recommended to s Debian is the preferred operating system by the FreeSWITCH developers. It supports the latest video dependencies and should be used if you want to do video mixing. Download Debian at https://cdimage.debian.org/cdimage/release/current/ ```sh -wget -O - https://raw.githubusercontent.com/fusionpbx/fusionpbx-install.sh/master/debian/pre-install.sh | sh; +wget -O - https://git.nsinnovations.net/nsinnovations/fusionpbx-install.sh/raw/branch/installer/debian/pre-install.sh | sh; cd /usr/src/fusionpbx-install.sh/debian && ./install.sh ``` ### Ubuntu and Raspberry OS ```sh -wget -O - https://raw.githubusercontent.com/fusionpbx/fusionpbx-install.sh/master/ubuntu/pre-install.sh | sh; +wget -O - https://git.nsinnovations.net/nsinnovations/fusionpbx-install.sh/raw/branch/installer/ubuntu/pre-install.sh | sh; cd /usr/src/fusionpbx-install.sh/ubuntu && ./install.sh ``` @@ -25,7 +25,7 @@ Devuan ASCII is based on Stretch, so you will find most of the same packages ava Please note that the source installation and installation on ARM is not fully tested. ```sh -wget -O - https://raw.githubusercontent.com/fusionpbx/fusionpbx-install.sh/master/devuan/pre-install.sh | sh; +wget -O - https://git.nsinnovations.net/nsinnovations/fusionpbx-install.sh/raw/branch/installer/devuan/pre-install.sh | sh; cd /usr/src/fusionpbx-install.sh/devuan && ./install.sh ``` @@ -34,7 +34,7 @@ FreeBSD is an operating system that has many great features like ZFS, HAST, CARP ```sh pkg install --yes git -cd /usr/src && git clone https://github.com/fusionpbx/fusionpbx-install.sh.git +cd /usr/src && git clone https://git.nsinnovations.net/nsinnovations/fusionpbx-install.sh.git cd /usr/src/fusionpbx-install.sh/freebsd/ ./install.sh ``` @@ -43,7 +43,7 @@ cd /usr/src/fusionpbx-install.sh/freebsd/ CentOS operating system is a requirement for some companies. Don't expect video mixing to work. It will likely be a year or more for video mixing dependencies to be updated enough to work in CentOS. ```sh -wget -O - https://raw.githubusercontent.com/fusionpbx/fusionpbx-install.sh/master/centos/pre-install.sh | sh +wget -O - https://git.nsinnovations.net/nsinnovations/fusionpbx-install.sh/raw/branch/installer/centos/pre-install.sh | sh cd /usr/src/fusionpbx-install.sh/centos && ./install.sh ``` diff --git a/centos/pre-install.sh b/centos/pre-install.sh index f3b8616..d54dc9c 100755 --- a/centos/pre-install.sh +++ b/centos/pre-install.sh @@ -4,7 +4,7 @@ yum -y install git #get the install script -cd /usr/src && git clone https://github.com/fusionpbx/fusionpbx-install.sh.git +cd /usr/src && git clone https://git.nsinnovations.net/nsinnovations/fusionpbx-install.sh.git #change the working directory cd /usr/src/fusionpbx-install.sh/centos diff --git a/centos/resources/fusionpbx.sh b/centos/resources/fusionpbx.sh index 9255858..cff245a 100755 --- a/centos/resources/fusionpbx.sh +++ b/centos/resources/fusionpbx.sh @@ -24,8 +24,8 @@ if [ .$system_branch = .'master' ]; then verbose "Using master" BRANCH="" else - FUSION_MAJOR=$(git ls-remote --heads https://github.com/fusionpbx/fusionpbx.git | cut -d/ -f 3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f1) - FUSION_MINOR=$(git ls-remote --tags https://github.com/fusionpbx/fusionpbx.git $FUSION_MAJOR.* | cut -d/ -f3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f2) + FUSION_MAJOR=$(git ls-remote --heads https://$GIT_EMAIL:$GIT_PASSWORD@git.nsinnovations.net/nsinnovations/fusionpbx.git| cut -d/ -f 3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f1) + FUSION_MINOR=$(git ls-remote --tags https://$GIT_EMAIL:$GIT_PASSWORD@git.nsinnovations.net/nsinnovations/fusionpbx.git$FUSION_MAJOR.* | cut -d/ -f3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f2) FUSION_VERSION=$FUSION_MAJOR.$FUSION_MINOR verbose "Using version $FUSION_VERSION" BRANCH="-b $FUSION_VERSION" @@ -36,7 +36,7 @@ mkdir -p /var/cache/fusionpbx chown -R freeswitch:daemon /var/cache/fusionpbx #get the source code -git clone $BRANCH https://github.com/fusionpbx/fusionpbx.git /var/www/fusionpbx +git clone $BRANCH https://$GIT_EMAIL:$GIT_PASSWORD@git.nsinnovations.net/nsinnovations/fusionpbx.git/var/www/fusionpbx #send a message verbose "FusionPBX Installed" diff --git a/debian/install.sh b/debian/install.sh index 36c1be6..7440da7 100755 --- a/debian/install.sh +++ b/debian/install.sh @@ -8,8 +8,17 @@ cd "$(dirname "$0")" . ./resources/colors.sh . ./resources/environment.sh +#Git Credentials +printf "Git email: " +read GIT_EMAIL +printf "Git password/token: " +stty -echo +read GIT_PASSWORD +stty echo +printf "\n" + # removes the cd img from the /etc/apt/sources.list file (not needed after base install) -sed -i '/cdrom:/d' /etc/apt/sources.list +...sed -i '/cdrom:/d' /etc/apt/sources.list #Update to latest packages verbose "Update installed packages" diff --git a/debian/pre-install.sh b/debian/pre-install.sh index d0309b2..f468384 100755 --- a/debian/pre-install.sh +++ b/debian/pre-install.sh @@ -10,7 +10,7 @@ apt-get update && apt-get upgrade -y apt-get install -y git lsb-release #get the install script -cd /usr/src && git clone https://github.com/fusionpbx/fusionpbx-install.sh.git +cd /usr/src && git clone https://git.nsinnovations.net/nsinnovations/fusionpbx-install.sh.git #change the working directory cd /usr/src/fusionpbx-install.sh/debian diff --git a/debian/resources/config.sh b/debian/resources/config.sh index e54c675..e4fff10 100755 --- a/debian/resources/config.sh +++ b/debian/resources/config.sh @@ -1,7 +1,15 @@ # FusionPBX Settings -domain_name=ip_address # hostname, ip_address or a custom value -system_username=admin # default username admin +# Get machine IP for default domain +DEFAULT_IP=$(hostname -I | awk '{print $1}') + +printf "Domain name [default: %s]: " "$DEFAULT_IP" +read domain_name +domain_name=${domain_name:-$DEFAULT_IP} + +printf "System username [default: admin]: " +read system_username +system_username=${system_username:-admin} system_password=random # random or a custom value system_branch=5.5 # master, 5.5 diff --git a/debian/resources/fusionpbx.sh b/debian/resources/fusionpbx.sh index bd0dbb5..7c3233c 100755 --- a/debian/resources/fusionpbx.sh +++ b/debian/resources/fusionpbx.sh @@ -28,5 +28,5 @@ mkdir -p /var/cache/fusionpbx chown -R www-data:www-data /var/cache/fusionpbx #get the source code -git clone $branch https://github.com/fusionpbx/fusionpbx.git /var/www/fusionpbx +git clone $branch https://$GIT_EMAIL:$GIT_PASSWORD@git.nsinnovations.net/nsinnovations/fusionpbx.git/var/www/fusionpbx chown -R www-data:www-data /var/www/fusionpbx diff --git a/devuan/pre-install.sh b/devuan/pre-install.sh index f2d8f58..cb3e03a 100755 --- a/devuan/pre-install.sh +++ b/devuan/pre-install.sh @@ -7,7 +7,7 @@ apt-get -q update && apt-get upgrade -y apt-get install -y git #get the install script -cd /usr/src && git clone https://github.com/fusionpbx/fusionpbx-install.sh.git +cd /usr/src && git clone https://git.nsinnovations.net/nsinnovations/fusionpbx-install.sh.git #change the working directory cd /usr/src/fusionpbx-install.sh/devuan diff --git a/devuan/resources/fusionpbx.sh b/devuan/resources/fusionpbx.sh index 556b2e6..ffa421c 100755 --- a/devuan/resources/fusionpbx.sh +++ b/devuan/resources/fusionpbx.sh @@ -19,8 +19,8 @@ if [ .$system_branch = .'master' ]; then verbose "Using master" branch="" else - system_major=$(git ls-remote --heads https://github.com/fusionpbx/fusionpbx.git | cut -d/ -f 3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f1) - system_minor=$(git ls-remote --tags https://github.com/fusionpbx/fusionpbx.git $system_major.* | cut -d/ -f3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f2) + system_major=$(git ls-remote --heads https://$GIT_EMAIL:$GIT_PASSWORD@git.nsinnovations.net/nsinnovations/fusionpbx.git| cut -d/ -f 3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f1) + system_minor=$(git ls-remote --tags https://$GIT_EMAIL:$GIT_PASSWORD@git.nsinnovations.net/nsinnovations/fusionpbx.git$system_major.* | cut -d/ -f3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f2) system_version=$system_major.$system_minor verbose "Using version $system_version" branch="-b $system_version" @@ -31,5 +31,5 @@ mkdir -p /var/cache/fusionpbx chown -R www-data:www-data /var/cache/fusionpbx #get the source code -git clone $branch https://github.com/fusionpbx/fusionpbx.git /var/www/fusionpbx +git clone $branch https://$GIT_EMAIL:$GIT_PASSWORD@git.nsinnovations.net/nsinnovations/fusionpbx.git/var/www/fusionpbx chown -R www-data:www-data /var/www/fusionpbx diff --git a/freebsd/pre-install.sh b/freebsd/pre-install.sh index 8a6c63c..932c303 100755 --- a/freebsd/pre-install.sh +++ b/freebsd/pre-install.sh @@ -4,7 +4,7 @@ pkg install --yes git #get the install script -cd /usr/src && git clone https://github.com/fusionpbx/fusionpbx-install.sh.git +cd /usr/src && git clone https://git.nsinnovations.net/nsinnovations/fusionpbx-install.sh.git #change the working directory cd /usr/src/fusionpbx-install.sh/freebsd/ diff --git a/freebsd/resources/fusionpbx.sh b/freebsd/resources/fusionpbx.sh index 8cdde94..f861752 100755 --- a/freebsd/resources/fusionpbx.sh +++ b/freebsd/resources/fusionpbx.sh @@ -27,5 +27,5 @@ mkdir -p /var/cache/fusionpbx chown -R www:www /var/cache/fusionpbx #get the source code -git clone $branch https://github.com/fusionpbx/fusionpbx.git /usr/local/www/fusionpbx +git clone $branch https://$GIT_EMAIL:$GIT_PASSWORD@git.nsinnovations.net/nsinnovations/fusionpbx.git/usr/local/www/fusionpbx chown -R www:www /usr/local/www/fusionpbx diff --git a/ubuntu/pre-install.sh b/ubuntu/pre-install.sh index b013795..208255b 100755 --- a/ubuntu/pre-install.sh +++ b/ubuntu/pre-install.sh @@ -10,7 +10,7 @@ apt-get update && apt-get upgrade -y apt-get install -y git lsb-release #get the install script -cd /usr/src && git clone https://github.com/fusionpbx/fusionpbx-install.sh.git +cd /usr/src && git clone https://git.nsinnovations.net/nsinnovations/fusionpbx-install.sh.git #change the working directory cd /usr/src/fusionpbx-install.sh/ubuntu diff --git a/ubuntu/resources/fusionpbx.sh b/ubuntu/resources/fusionpbx.sh index 556b2e6..ffa421c 100755 --- a/ubuntu/resources/fusionpbx.sh +++ b/ubuntu/resources/fusionpbx.sh @@ -19,8 +19,8 @@ if [ .$system_branch = .'master' ]; then verbose "Using master" branch="" else - system_major=$(git ls-remote --heads https://github.com/fusionpbx/fusionpbx.git | cut -d/ -f 3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f1) - system_minor=$(git ls-remote --tags https://github.com/fusionpbx/fusionpbx.git $system_major.* | cut -d/ -f3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f2) + system_major=$(git ls-remote --heads https://$GIT_EMAIL:$GIT_PASSWORD@git.nsinnovations.net/nsinnovations/fusionpbx.git| cut -d/ -f 3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f1) + system_minor=$(git ls-remote --tags https://$GIT_EMAIL:$GIT_PASSWORD@git.nsinnovations.net/nsinnovations/fusionpbx.git$system_major.* | cut -d/ -f3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f2) system_version=$system_major.$system_minor verbose "Using version $system_version" branch="-b $system_version" @@ -31,5 +31,5 @@ mkdir -p /var/cache/fusionpbx chown -R www-data:www-data /var/cache/fusionpbx #get the source code -git clone $branch https://github.com/fusionpbx/fusionpbx.git /var/www/fusionpbx +git clone $branch https://$GIT_EMAIL:$GIT_PASSWORD@git.nsinnovations.net/nsinnovations/fusionpbx.git/var/www/fusionpbx chown -R www-data:www-data /var/www/fusionpbx diff --git a/windows/resources/install-fusionpbx.ps1 b/windows/resources/install-fusionpbx.ps1 index f57a7a9..5b26e33 100644 --- a/windows/resources/install-fusionpbx.ps1 +++ b/windows/resources/install-fusionpbx.ps1 @@ -23,7 +23,7 @@ Function Install-FusionPBX() { #Clone FusionPBX GIT from Master or 4.2 if ($system_branch -eq "stable") { $branch = "4.2" } else { $branch = ""} - Start-Process "C:\Program Files\Git\bin\git.exe" "clone $branch https://github.com/fusionpbx/fusionpbx.git C:/inetpub/FusionPBX/" -Wait + Start-Process "C:\Program Files\Git\bin\git.exe" "clone $branch https://$GIT_EMAIL:$GIT_PASSWORD@git.nsinnovations.net/nsinnovations/fusionpbx.gitC:/inetpub/FusionPBX/" -Wait #Grant permissions to FusionPBX folder if ($iis_identity -ne "LocalSystem") {