forked from norman/fusionpbx-install.sh-github-mirror
Compare commits
20 Commits
original-b
...
installer
| Author | SHA1 | Date | |
|---|---|---|---|
| a15ce6fe8a | |||
|
|
ba8f626058 | ||
|
|
f0154a9db8 | ||
|
|
c97579ab69 | ||
|
|
2e68b248cb | ||
|
|
733a33f231 | ||
|
|
cf10439e57 | ||
|
|
b8666cb2bb | ||
|
|
9da8998fee | ||
|
|
d2e2579bdf | ||
|
|
066ffe546a | ||
| 7c4d0d1e11 | |||
| adf53bb33f | |||
| d12a870efb | |||
| 28e960adef | |||
| 78e081320d | |||
| 5db4a3f259 | |||
| 802f168bde | |||
| 787216ebff | |||
| af3a9b2d16 |
10
README.md
10
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/
|
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
|
```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
|
cd /usr/src/fusionpbx-install.sh/debian && ./install.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Ubuntu and Raspberry OS
|
### Ubuntu and Raspberry OS
|
||||||
```sh
|
```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
|
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.
|
Please note that the source installation and installation on ARM is not fully tested.
|
||||||
|
|
||||||
```sh
|
```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
|
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
|
```sh
|
||||||
pkg install --yes git
|
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/
|
cd /usr/src/fusionpbx-install.sh/freebsd/
|
||||||
./install.sh
|
./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.
|
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
|
```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
|
cd /usr/src/fusionpbx-install.sh/centos && ./install.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
yum -y install git
|
yum -y install git
|
||||||
|
|
||||||
#get the install script
|
#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
|
#change the working directory
|
||||||
cd /usr/src/fusionpbx-install.sh/centos
|
cd /usr/src/fusionpbx-install.sh/centos
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ if [ .$system_branch = .'master' ]; then
|
|||||||
verbose "Using master"
|
verbose "Using master"
|
||||||
BRANCH=""
|
BRANCH=""
|
||||||
else
|
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_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://github.com/fusionpbx/fusionpbx.git $FUSION_MAJOR.* | cut -d/ -f3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f2)
|
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
|
FUSION_VERSION=$FUSION_MAJOR.$FUSION_MINOR
|
||||||
verbose "Using version $FUSION_VERSION"
|
verbose "Using version $FUSION_VERSION"
|
||||||
BRANCH="-b $FUSION_VERSION"
|
BRANCH="-b $FUSION_VERSION"
|
||||||
@@ -36,7 +36,7 @@ mkdir -p /var/cache/fusionpbx
|
|||||||
chown -R freeswitch:daemon /var/cache/fusionpbx
|
chown -R freeswitch:daemon /var/cache/fusionpbx
|
||||||
|
|
||||||
#get the source code
|
#get the source code
|
||||||
git clone $BRANCH https://github.com/fusionpbx/fusionpbx.git /var/www/fusionpbx
|
git clone $BRANCH https://git.nsinnovations.net/nsinnovations/fusionpbx.gitvar/www/fusionpbx
|
||||||
|
|
||||||
#send a message
|
#send a message
|
||||||
verbose "FusionPBX Installed"
|
verbose "FusionPBX Installed"
|
||||||
|
|||||||
5
debian/install.sh
vendored
5
debian/install.sh
vendored
@@ -11,8 +11,8 @@ cd "$(dirname "$0")"
|
|||||||
# removes the cd img from the /etc/apt/sources.list file (not needed after base install)
|
# 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
|
#Update to the latest packages
|
||||||
verbose "Update installed packages"
|
verbose "Update installed packages."
|
||||||
apt-get update && apt-get upgrade -y
|
apt-get update && apt-get upgrade -y
|
||||||
|
|
||||||
#Add dependencies
|
#Add dependencies
|
||||||
@@ -25,6 +25,7 @@ apt-get install -y dialog
|
|||||||
apt-get install -y nano
|
apt-get install -y nano
|
||||||
apt-get install -y net-tools
|
apt-get install -y net-tools
|
||||||
apt-get install -y gpg
|
apt-get install -y gpg
|
||||||
|
apt-get install -y unzip
|
||||||
|
|
||||||
#SNMP
|
#SNMP
|
||||||
apt-get install -y snmpd
|
apt-get install -y snmpd
|
||||||
|
|||||||
2
debian/pre-install.sh
vendored
2
debian/pre-install.sh
vendored
@@ -10,7 +10,7 @@ apt-get update && apt-get upgrade -y
|
|||||||
apt-get install -y git lsb-release
|
apt-get install -y git lsb-release
|
||||||
|
|
||||||
#get the install script
|
#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
|
#change the working directory
|
||||||
cd /usr/src/fusionpbx-install.sh/debian
|
cd /usr/src/fusionpbx-install.sh/debian
|
||||||
|
|||||||
2
debian/resources/fusionpbx.sh
vendored
2
debian/resources/fusionpbx.sh
vendored
@@ -28,5 +28,5 @@ mkdir -p /var/cache/fusionpbx
|
|||||||
chown -R www-data:www-data /var/cache/fusionpbx
|
chown -R www-data:www-data /var/cache/fusionpbx
|
||||||
|
|
||||||
#get the source code
|
#get the source code
|
||||||
git clone $branch https://github.com/fusionpbx/fusionpbx.git /var/www/fusionpbx
|
git clone $branch https://git.nsinnovations.net/nsinnovations/fusionpbx.git /var/www/fusionpbx
|
||||||
chown -R www-data:www-data /var/www/fusionpbx
|
chown -R www-data:www-data /var/www/fusionpbx
|
||||||
|
|||||||
25
debian/resources/maintenance/call_recordings.php
vendored
25
debian/resources/maintenance/call_recordings.php
vendored
@@ -156,17 +156,26 @@ crontab -e
|
|||||||
if (!file_exists($new_path)) { system('mkdir -p '.$new_path); }
|
if (!file_exists($new_path)) { system('mkdir -p '.$new_path); }
|
||||||
$command = "mv ".$old_path."/".$record_name." ".$new_path."/".$record_name;
|
$command = "mv ".$old_path."/".$record_name." ".$new_path."/".$record_name;
|
||||||
if ($debug) { echo $command."\n"; }
|
if ($debug) { echo $command."\n"; }
|
||||||
system($command);
|
system($command, $move_result_code);
|
||||||
|
|
||||||
|
//skip the database update if the move failed
|
||||||
|
if ($move_result_code !== 0) {
|
||||||
|
if ($debug) { echo "mv failed with exit code ".$move_result_code.", skipping database update.\n"; }
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//set the sql update params
|
||||||
|
$sql_params = [];
|
||||||
|
if ($action_name == 'move' || $action_name == 'both') {
|
||||||
|
$sql_params[] = "record_path = '".$new_path."'";
|
||||||
|
}
|
||||||
|
if ($action_name == 'convert' || $action_name == 'both') {
|
||||||
|
$sql_params[] = "record_name = '".$path_parts['filename'].".mp3'";
|
||||||
}
|
}
|
||||||
|
|
||||||
//update the database to the new directory
|
//update the database to the new directory
|
||||||
$sql = "update v_xml_cdr set \n";
|
$sql = "update v_xml_cdr set " . implode(", ", $sql_params) . " \n";
|
||||||
if ($action_name == 'move' || $action_name == 'both') {
|
|
||||||
$sql .= "record_path = '".$new_path."' \n";
|
|
||||||
}
|
|
||||||
if ($action_name == 'convert' || $action_name == 'both') {
|
|
||||||
$sql .= "record_name = '".$path_parts['filename'].".mp3'\n";
|
|
||||||
}
|
|
||||||
$sql .= "where xml_cdr_uuid = '".$row['xml_cdr_uuid']."';\n";
|
$sql .= "where xml_cdr_uuid = '".$row['xml_cdr_uuid']."';\n";
|
||||||
if ($debug) { echo $sql."\n"; }
|
if ($debug) { echo $sql."\n"; }
|
||||||
$database->execute($sql);
|
$database->execute($sql);
|
||||||
|
|||||||
28
debian/resources/switch/source-release.sh
vendored
28
debian/resources/switch/source-release.sh
vendored
@@ -35,6 +35,12 @@ if [ ."$os_codename" = ."trixie" ]; then
|
|||||||
apt install -y python3-distutils-extra plocate
|
apt install -y python3-distutils-extra plocate
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#use master branch for Debian 13 for now
|
||||||
|
if [ ."$os_codename" = ."trixie" ]; then
|
||||||
|
switch_branch=master
|
||||||
|
switch_version=1.10.13
|
||||||
|
fi
|
||||||
|
|
||||||
# additional dependencies
|
# additional dependencies
|
||||||
apt install -y sqlite3 unzip
|
apt install -y sqlite3 unzip
|
||||||
|
|
||||||
@@ -42,7 +48,7 @@ apt install -y sqlite3 unzip
|
|||||||
CWD=$(pwd)
|
CWD=$(pwd)
|
||||||
|
|
||||||
#install the following dependencies if the switch version is greater than 1.10.0
|
#install the following dependencies if the switch version is greater than 1.10.0
|
||||||
if [ ."$switch_version" = ."master" ] || [ $(echo "$switch_version" | tr -d '.') -gt 1100 ] || [ ."$os_codename" = ."trixie" ]; then
|
if [ ."$switch_branch" = ."master" ] || [ $(echo "$switch_version" | tr -d '.') -gt 1100 ]; then
|
||||||
|
|
||||||
# libks build-requirements
|
# libks build-requirements
|
||||||
apt install -y cmake uuid-dev
|
apt install -y cmake uuid-dev
|
||||||
@@ -60,7 +66,7 @@ if [ ."$switch_version" = ."master" ] || [ $(echo "$switch_version" | tr -d '.')
|
|||||||
|
|
||||||
# sofia-sip
|
# sofia-sip
|
||||||
cd /usr/src
|
cd /usr/src
|
||||||
if [ ."$sofia_version" = ."master" ] || [ ."$os_codename" = ."trixie" ]; then
|
if [ ."$sofia_version" = ."master" ]; then
|
||||||
git clone https://github.com/freeswitch/sofia-sip.git sofia-sip
|
git clone https://github.com/freeswitch/sofia-sip.git sofia-sip
|
||||||
cd sofia-sip
|
cd sofia-sip
|
||||||
else
|
else
|
||||||
@@ -77,7 +83,7 @@ if [ ."$switch_version" = ."master" ] || [ $(echo "$switch_version" | tr -d '.')
|
|||||||
cd /usr/src
|
cd /usr/src
|
||||||
git clone https://github.com/freeswitch/spandsp.git spandsp
|
git clone https://github.com/freeswitch/spandsp.git spandsp
|
||||||
cd spandsp
|
cd spandsp
|
||||||
if [ ."$sofia_version" != ."master" ] && [ ."$os_codename" != ."trixie" ] && [ ."$switch_branch" != ."master" ]; then
|
if [ ."$sofia_version" != ."master" ] && [ ."$switch_branch" != ."master" ]; then
|
||||||
git reset --hard 0d2e6ac65e0e8f53d652665a743015a88bf048d4
|
git reset --hard 0d2e6ac65e0e8f53d652665a743015a88bf048d4
|
||||||
fi
|
fi
|
||||||
#/usr/bin/sed -i 's/AC_PREREQ(\[2\.71\])/AC_PREREQ([2.69])/g' /usr/src/spandsp/configure.ac
|
#/usr/bin/sed -i 's/AC_PREREQ(\[2\.71\])/AC_PREREQ([2.69])/g' /usr/src/spandsp/configure.ac
|
||||||
@@ -91,7 +97,7 @@ fi
|
|||||||
cd /usr/src
|
cd /usr/src
|
||||||
|
|
||||||
#check for master
|
#check for master
|
||||||
if [ ."$os_codename" = ."trixie" ] || [ ."$switch_branch" = ."master" ]; then
|
if [ ."$switch_branch" = ."master" ]; then
|
||||||
#master branch
|
#master branch
|
||||||
echo "Using version master"
|
echo "Using version master"
|
||||||
rm -r /usr/src/freeswitch
|
rm -r /usr/src/freeswitch
|
||||||
@@ -100,14 +106,14 @@ if [ ."$os_codename" = ."trixie" ] || [ ."$switch_branch" = ."master" ]; then
|
|||||||
|
|
||||||
git remote add fusionpbx https://github.com/fusionpbx/freeswitch.git
|
git remote add fusionpbx https://github.com/fusionpbx/freeswitch.git
|
||||||
git fetch fusionpbx
|
git fetch fusionpbx
|
||||||
git checkout -b $switch_version
|
git checkout 1.10.12
|
||||||
|
|
||||||
git rebase fusionpbx/master
|
git rebase fusionpbx/master
|
||||||
./bootstrap.sh -j
|
./bootstrap.sh -j
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#check for stable release
|
#check for stable release
|
||||||
if [ ."$switch_branch" != ."master" ] && [ ."$os_codename" != ."trixie" ] && [ ."$switch_branch" = ."stable" ]; then
|
if [ ."$switch_branch" != ."master" ] && [ ."$switch_branch" = ."stable" ]; then
|
||||||
echo "Using version $switch_version"
|
echo "Using version $switch_version"
|
||||||
#1.8 and older
|
#1.8 and older
|
||||||
if [ $(echo "$switch_version" | tr -d '.') -lt 1100 ]; then
|
if [ $(echo "$switch_version" | tr -d '.') -lt 1100 ]; then
|
||||||
@@ -116,18 +122,22 @@ if [ ."$switch_branch" != ."master" ] && [ ."$os_codename" != ."trixie" ] && [ .
|
|||||||
cd /usr/src/freeswitch-$switch_version
|
cd /usr/src/freeswitch-$switch_version
|
||||||
|
|
||||||
# Reset repo just-in-case we are rebuilding
|
# Reset repo just-in-case we are rebuilding
|
||||||
git reset --hard HEAD && git clean -fdx
|
#git reset --hard HEAD && git clean -fdx
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#1.10.0 and newer
|
#1.10.0 and newer
|
||||||
if [ $(echo "$switch_version" | tr -d '.') -gt 1100 ]; then
|
if [ $(echo "$switch_version" | tr -d '.') -gt 1100 ]; then
|
||||||
|
# Get the source code using git
|
||||||
git clone https://github.com/fusionpbx/freeswitch freeswitch-$switch_version
|
git clone https://github.com/fusionpbx/freeswitch freeswitch-$switch_version
|
||||||
|
|
||||||
|
# Change the working directory
|
||||||
cd /usr/src/freeswitch-$switch_version
|
cd /usr/src/freeswitch-$switch_version
|
||||||
|
|
||||||
|
# Get the stable branch
|
||||||
|
git checkout $switch_version
|
||||||
|
|
||||||
# Reset repo just-in-case we are rebuilding
|
# Reset repo just-in-case we are rebuilding
|
||||||
git reset --hard origin/master && git clean -fdx
|
#git reset --hard origin/master && git clean -fdx
|
||||||
|
|
||||||
#wget http://files.freeswitch.org/freeswitch-releases/freeswitch-$switch_version.-release.zip
|
#wget http://files.freeswitch.org/freeswitch-releases/freeswitch-$switch_version.-release.zip
|
||||||
#unzip freeswitch-$switch_version.-release.zip
|
#unzip freeswitch-$switch_version.-release.zip
|
||||||
|
|||||||
46
debian/resources/switch/source-sounds.sh
vendored
46
debian/resources/switch/source-sounds.sh
vendored
@@ -1,20 +1,44 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
#move to script directory so all relative paths work
|
# Move to script directory so all relative paths work
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
#includes
|
# Includes
|
||||||
. ../config.sh
|
. ../config.sh
|
||||||
. ../environment.sh
|
. ../environment.sh
|
||||||
|
|
||||||
# change the working directory
|
# Change the working directory
|
||||||
cd /usr/src/freeswitch-$switch_version
|
cd /usr/share/freeswitch/sounds
|
||||||
|
|
||||||
# compile and install the sounds
|
# Make sure wget is installed
|
||||||
make sounds-install moh-install
|
apt-get install -y wget
|
||||||
make hd-sounds-install hd-moh-install
|
|
||||||
make cd-sounds-install cd-moh-install
|
|
||||||
|
|
||||||
#move the music into music/default directory
|
# Array of sample rates
|
||||||
mkdir -p /usr/share/freeswitch/sounds/music/default
|
sample_rates="48000 32000 16000 8000"
|
||||||
mv /usr/share/freeswitch/sounds/music/*000 /usr/share/freeswitch/sounds/music/default
|
|
||||||
|
# Loop through each sample rate
|
||||||
|
for sample_rate in $sample_rates; do
|
||||||
|
# Download the file
|
||||||
|
/usr/bin/wget "https://files.freeswitch.org/releases/sounds/freeswitch-sounds-en-us-callie-${sample_rate}-1.0.53.tar.gz"
|
||||||
|
|
||||||
|
# Extract the file
|
||||||
|
/usr/bin/tar xvzf "freeswitch-sounds-en-us-callie-${sample_rate}-1.0.53.tar.gz"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Change to directory to the music directory
|
||||||
|
cd /usr/share/freeswitch/sounds/music
|
||||||
|
|
||||||
|
# Loop through each sample rate
|
||||||
|
for sample_rate in $sample_rates; do
|
||||||
|
# Download the file
|
||||||
|
/usr/bin/wget "https://files.freeswitch.org/releases/sounds/freeswitch-sounds-music-${sample_rate}-1.0.52.tar.gz"
|
||||||
|
|
||||||
|
# Extract the file
|
||||||
|
/usr/bin/tar xvzf "freeswitch-sounds-music-${sample_rate}-1.0.52.tar.gz"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Move the music to the default directory
|
||||||
|
/usr/bin/mv music default
|
||||||
|
|
||||||
|
# Remove the tar.gz files
|
||||||
|
/usr/bin/rm /usr/share/freeswitch/sounds/music/*.tar.gz
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ apt-get -q update && apt-get upgrade -y
|
|||||||
apt-get install -y git
|
apt-get install -y git
|
||||||
|
|
||||||
#get the install script
|
#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
|
#change the working directory
|
||||||
cd /usr/src/fusionpbx-install.sh/devuan
|
cd /usr/src/fusionpbx-install.sh/devuan
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ if [ .$system_branch = .'master' ]; then
|
|||||||
verbose "Using master"
|
verbose "Using master"
|
||||||
branch=""
|
branch=""
|
||||||
else
|
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_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://github.com/fusionpbx/fusionpbx.git $system_major.* | cut -d/ -f3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f2)
|
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
|
system_version=$system_major.$system_minor
|
||||||
verbose "Using version $system_version"
|
verbose "Using version $system_version"
|
||||||
branch="-b $system_version"
|
branch="-b $system_version"
|
||||||
@@ -31,5 +31,5 @@ mkdir -p /var/cache/fusionpbx
|
|||||||
chown -R www-data:www-data /var/cache/fusionpbx
|
chown -R www-data:www-data /var/cache/fusionpbx
|
||||||
|
|
||||||
#get the source code
|
#get the source code
|
||||||
git clone $branch https://github.com/fusionpbx/fusionpbx.git /var/www/fusionpbx
|
git clone $branch https://git.nsinnovations.net/nsinnovations/fusionpbx.gitvar/www/fusionpbx
|
||||||
chown -R www-data:www-data /var/www/fusionpbx
|
chown -R www-data:www-data /var/www/fusionpbx
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
pkg install --yes git
|
pkg install --yes git
|
||||||
|
|
||||||
#get the install script
|
#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
|
#change the working directory
|
||||||
cd /usr/src/fusionpbx-install.sh/freebsd/
|
cd /usr/src/fusionpbx-install.sh/freebsd/
|
||||||
|
|||||||
@@ -27,5 +27,5 @@ mkdir -p /var/cache/fusionpbx
|
|||||||
chown -R www:www /var/cache/fusionpbx
|
chown -R www:www /var/cache/fusionpbx
|
||||||
|
|
||||||
#get the source code
|
#get the source code
|
||||||
git clone $branch https://github.com/fusionpbx/fusionpbx.git /usr/local/www/fusionpbx
|
git clone $branch https://git.nsinnovations.net/nsinnovations/fusionpbx.gitusr/local/www/fusionpbx
|
||||||
chown -R www:www /usr/local/www/fusionpbx
|
chown -R www:www /usr/local/www/fusionpbx
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ cd "$(dirname "$0")"
|
|||||||
# removes the cd img from the /etc/apt/sources.list file (not needed after base install)
|
# 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
|
#Update to the latest packages
|
||||||
verbose "Update installed packages"
|
verbose "Update installed packages."
|
||||||
apt-get update && apt-get upgrade -y
|
apt-get update && apt-get upgrade -y
|
||||||
|
|
||||||
#Add dependencies
|
#Add dependencies
|
||||||
@@ -25,6 +25,7 @@ apt-get install -y dialog
|
|||||||
apt-get install -y nano
|
apt-get install -y nano
|
||||||
apt-get install -y nginx
|
apt-get install -y nginx
|
||||||
apt-get install -y build-essential
|
apt-get install -y build-essential
|
||||||
|
apt-get install -y unzip
|
||||||
|
|
||||||
#SNMP
|
#SNMP
|
||||||
apt-get install -y snmpd
|
apt-get install -y snmpd
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ apt-get update && apt-get upgrade -y
|
|||||||
apt-get install -y git lsb-release
|
apt-get install -y git lsb-release
|
||||||
|
|
||||||
#get the install script
|
#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
|
#change the working directory
|
||||||
cd /usr/src/fusionpbx-install.sh/ubuntu
|
cd /usr/src/fusionpbx-install.sh/ubuntu
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ if [ .$system_branch = .'master' ]; then
|
|||||||
verbose "Using master"
|
verbose "Using master"
|
||||||
branch=""
|
branch=""
|
||||||
else
|
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_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://github.com/fusionpbx/fusionpbx.git $system_major.* | cut -d/ -f3 | grep -P '^\d+\.\d+' | sort | tail -n 1 | cut -d. -f2)
|
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
|
system_version=$system_major.$system_minor
|
||||||
verbose "Using version $system_version"
|
verbose "Using version $system_version"
|
||||||
branch="-b $system_version"
|
branch="-b $system_version"
|
||||||
@@ -31,5 +31,5 @@ mkdir -p /var/cache/fusionpbx
|
|||||||
chown -R www-data:www-data /var/cache/fusionpbx
|
chown -R www-data:www-data /var/cache/fusionpbx
|
||||||
|
|
||||||
#get the source code
|
#get the source code
|
||||||
git clone $branch https://github.com/fusionpbx/fusionpbx.git /var/www/fusionpbx
|
git clone $branch https://git.nsinnovations.net/nsinnovations/fusionpbx.gitvar/www/fusionpbx
|
||||||
chown -R www-data:www-data /var/www/fusionpbx
|
chown -R www-data:www-data /var/www/fusionpbx
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ Function Install-FusionPBX() {
|
|||||||
#Clone FusionPBX GIT from Master or 4.2
|
#Clone FusionPBX GIT from Master or 4.2
|
||||||
if ($system_branch -eq "stable") { $branch = "4.2" }
|
if ($system_branch -eq "stable") { $branch = "4.2" }
|
||||||
else { $branch = ""}
|
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
|
#Grant permissions to FusionPBX folder
|
||||||
if ($iis_identity -ne "LocalSystem") {
|
if ($iis_identity -ne "LocalSystem") {
|
||||||
|
|||||||
Reference in New Issue
Block a user