forked from norman/fusionpbx-install.sh-github-mirror
Compare commits
45 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f6ba696e9e | |||
|
|
4edf944a30 | ||
|
|
b9dbc89cd0 | ||
|
|
e7fbaf0dea | ||
|
|
c5a88e706c | ||
|
|
3dc4ef925e | ||
|
|
722d916271 | ||
|
|
f7485fbb75 | ||
|
|
55a34eb2e4 | ||
|
|
1d4100b95f | ||
|
|
6289b6885b | ||
|
|
0f61e19ed9 | ||
|
|
672c139f04 | ||
|
|
00c75a481d | ||
|
|
4c5e073695 | ||
|
|
b72e415c77 | ||
|
|
d82295ed0e | ||
|
|
e5d03d791e | ||
|
|
aa4adaf4c0 | ||
|
|
c116e82027 | ||
|
|
919d37cc52 | ||
|
|
22e28953af | ||
|
|
092788e350 | ||
|
|
d65f9360aa | ||
|
|
3758a7af12 | ||
| 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/
|
||||
|
||||
```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
|
||||
```
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.nsinnovations.net/nsinnovations/fusionpbx.gitvar/www/fusionpbx
|
||||
|
||||
#send a message
|
||||
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)
|
||||
sed -i '/cdrom:/d' /etc/apt/sources.list
|
||||
|
||||
#Update to latest packages
|
||||
verbose "Update installed packages"
|
||||
#Update to the latest packages
|
||||
verbose "Update installed packages."
|
||||
apt-get update && apt-get upgrade -y
|
||||
|
||||
#Add dependencies
|
||||
@@ -25,6 +25,7 @@ apt-get install -y dialog
|
||||
apt-get install -y nano
|
||||
apt-get install -y net-tools
|
||||
apt-get install -y gpg
|
||||
apt-get install -y unzip
|
||||
|
||||
#SNMP
|
||||
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
|
||||
|
||||
#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
|
||||
|
||||
2
debian/resources/config.sh
vendored
2
debian/resources/config.sh
vendored
@@ -9,7 +9,7 @@ system_branch=5.5 # master, 5.5
|
||||
switch_branch=stable # master, stable
|
||||
switch_source=true # true (source compile) or false (binary package)
|
||||
switch_package=false # true (binary package) or false (source compile)
|
||||
switch_version=1.10.12 # which source code to download, only for source
|
||||
switch_version=1.11 # which source code to download, only for source
|
||||
switch_tls=true # true or false
|
||||
switch_token= # Get the auth token from https://signalwire.com
|
||||
# Signup or Login -> Profile -> Personal Auth Token
|
||||
|
||||
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
|
||||
|
||||
#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
|
||||
|
||||
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); }
|
||||
$command = "mv ".$old_path."/".$record_name." ".$new_path."/".$record_name;
|
||||
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
|
||||
$sql = "update v_xml_cdr set \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 = "update v_xml_cdr set " . implode(", ", $sql_params) . " \n";
|
||||
$sql .= "where xml_cdr_uuid = '".$row['xml_cdr_uuid']."';\n";
|
||||
if ($debug) { echo $sql."\n"; }
|
||||
$database->execute($sql);
|
||||
|
||||
18
debian/resources/nginx.sh
vendored
18
debian/resources/nginx.sh
vendored
@@ -17,6 +17,15 @@ if [ ."$cpu_architecture" = ."arm" ]; then
|
||||
if [ ."$os_codename" = ."bullseye" ]; then
|
||||
php_version=7.4
|
||||
fi
|
||||
if [ ."$os_codename" = ."bookworm" ]; then
|
||||
php_version=8.2
|
||||
fi
|
||||
if [ ."$os_codename" = ."trixie" ]; then
|
||||
php_version=8.4
|
||||
fi
|
||||
if [ ."$os_codename" = ."forky" ]; then
|
||||
php_version=8.4
|
||||
fi
|
||||
fi
|
||||
|
||||
#set the version of php
|
||||
@@ -86,6 +95,15 @@ if [ .$letsencrypt_folder = .true ]; then
|
||||
mkdir -p /var/www/letsencrypt/
|
||||
fi
|
||||
|
||||
# Ensure apache2 is stopped and cannot start
|
||||
if systemctl is-active --quiet apache2; then
|
||||
verbose "Stopping Apache to clear port 80/443..."
|
||||
systemctl stop apache2
|
||||
fi
|
||||
|
||||
# Prevent apache from starting at boot
|
||||
systemctl disable apache2
|
||||
|
||||
#flush systemd cache
|
||||
systemctl daemon-reload
|
||||
|
||||
|
||||
9
debian/resources/php.sh
vendored
9
debian/resources/php.sh
vendored
@@ -34,6 +34,12 @@ elif [ ."$cpu_architecture" = ."arm" ]; then
|
||||
if [ ."$os_codename" = ."bookworm" ]; then
|
||||
php_version=8.2
|
||||
fi
|
||||
if [ ."$os_codename" = ."trixie" ]; then
|
||||
php_version=8.4
|
||||
fi
|
||||
if [ ."$os_codename" = ."forky" ]; then
|
||||
php_version=8.4
|
||||
fi
|
||||
else
|
||||
#11.x - bullseye
|
||||
#10.x - buster
|
||||
@@ -154,7 +160,8 @@ if [ ."$php_version" = ."8.3" ]; then
|
||||
apt-get install -y --no-install-recommends php8.3 php8.3-common php8.3-cli php8.3-dev php8.3-fpm php8.3-pgsql php8.3-sqlite3 php8.3-odbc php8.3-curl php8.3-imap php8.3-xml php8.3-gd php8.3-mbstring php8.3-ldap php8.3-inotify php8.3-snmp
|
||||
fi
|
||||
if [ ."$php_version" = ."8.4" ]; then
|
||||
apt-get install -y --no-install-recommends php8.4 php8.4-common php8.4-cli php8.4-dev php8.4-fpm php8.4-pgsql php8.4-sqlite3 php8.4-odbc php8.4-curl php8.4-imap php8.4-xml php8.4-gd php8.4-mbstring php8.4-ldap php8.4-inotify php8.4-snmp
|
||||
apt-get install -y --no-install-recommends php8.4 php8.4-common php8.4-cli php8.4-dev php8.4-fpm php8.4-pgsql php8.4-sqlite3 php8.4-odbc php8.4-curl php8.4-xml php8.4-gd php8.4-mbstring php8.4-ldap php8.4-inotify php8.4-snmp
|
||||
apt-get install -y --no-install-recommends php8.4-imap
|
||||
fi
|
||||
|
||||
#update config if source is being used
|
||||
|
||||
3
debian/resources/sngrep.sh
vendored
3
debian/resources/sngrep.sh
vendored
@@ -11,7 +11,8 @@ cd "$(dirname "$0")"
|
||||
#add sngrep
|
||||
if [ ."$cpu_architecture" = ."arm" ]; then
|
||||
#source install
|
||||
apt-get install -y git autoconf automake gcc make libncurses5-dev libpcap-dev libssl-dev libpcre3-dev
|
||||
apt-get install -y git autoconf automake gcc make libncurses5-dev libpcap-dev libssl-dev
|
||||
apt-get install -y libpcre3-dev
|
||||
cd /usr/src && git clone https://github.com/irontec/sngrep
|
||||
cd /usr/src/sngrep && ./bootstrap.sh
|
||||
cd /usr/src/sngrep && ./configure
|
||||
|
||||
3
debian/resources/switch/source-master.sh
vendored
3
debian/resources/switch/source-master.sh
vendored
@@ -1,7 +1,8 @@
|
||||
#!/bin/sh
|
||||
echo "Installing the FreeSWITCH source"
|
||||
DEBIAN_FRONTEND=none APT_LISTCHANGES_FRONTEND=none apt-get install -y ntpdate libapache2-mod-log-sql-ssl libfreetype6-dev git-buildpackage doxygen yasm nasm gdb git build-essential automake autoconf 'libtool-bin|libtool' python uuid-dev zlib1g-dev 'libjpeg8-dev|libjpeg62-turbo-dev' libncurses5-dev libssl-dev libpcre3-dev libcurl4-openssl-dev libldns-dev libedit-dev libspeexdsp-dev libspeexdsp-dev libsqlite3-dev perl libgdbm-dev libdb-dev bison libvlc-dev libvlccore-dev vlc-nox pkg-config ccache libpng-dev libvpx-dev libyuv-dev libopenal-dev libbroadvoice-dev libcodec2-dev libflite-dev libg7221-dev libilbc-dev libmongoc-dev libsilk-dev libsoundtouch-dev libmagickcore-dev liblua5.2-dev libopus-dev libsndfile-dev libopencv-dev libavformat-dev libx264-dev erlang-dev libldap2-dev libmemcached-dev libperl-dev portaudio19-dev python-dev libsnmp-dev libyaml-dev libmp4v2-dev
|
||||
DEBIAN_FRONTEND=none APT_LISTCHANGES_FRONTEND=none apt-get install -y libapache2-mod-log-sql-ssl libfreetype6-dev git-buildpackage doxygen yasm nasm gdb git build-essential automake autoconf 'libtool-bin|libtool' uuid-dev zlib1g-dev 'libjpeg8-dev|libjpeg62-turbo-dev' libncurses5-dev libssl-dev libcurl4-openssl-dev libldns-dev libedit-dev libspeexdsp-dev libspeexdsp-dev libsqlite3-dev perl libgdbm-dev libdb-dev bison libvlc-dev libvlccore-dev vlc-nox pkg-config ccache libpng-dev libvpx-dev libyuv-dev libopenal-dev libbroadvoice-dev libcodec2-dev libflite-dev libg7221-dev libilbc-dev libmongoc-dev libsilk-dev libsoundtouch-dev libmagickcore-dev liblua5.2-dev libopus-dev libsndfile-dev libopencv-dev libavformat-dev libx264-dev erlang-dev libldap2-dev libmemcached-dev libperl-dev portaudio19-dev libsnmp-dev libyaml-dev
|
||||
apt-get install -y unzip libpq-dev libvlc-dev memcached libshout3-dev libvpx-dev libmpg123-dev libmp3lame-dev
|
||||
apt-get install -y ntpdate python libpcre3-dev python-dev libmp4v2-dev
|
||||
|
||||
apt-get update && apt-get install -y ntp curl haveged
|
||||
curl https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add -
|
||||
|
||||
99
debian/resources/switch/source-release.sh
vendored
99
debian/resources/switch/source-release.sh
vendored
@@ -13,10 +13,12 @@ apt update && apt upgrade -y
|
||||
# install dependencies
|
||||
apt install -y autoconf automake devscripts g++ git-core libncurses5-dev libtool libtool-bin make libjpeg-dev
|
||||
apt install -y pkg-config flac libgdbm-dev libdb-dev gettext sudo equivs git dpkg-dev libpq-dev
|
||||
apt install -y liblua5.2-dev libtiff5-dev libperl-dev libcurl4-openssl-dev libsqlite3-dev libpcre3-dev
|
||||
apt install -y liblua5.2-dev libtiff5-dev libperl-dev libcurl4-openssl-dev libsqlite3-dev
|
||||
apt install -y devscripts libspeexdsp-dev libspeex-dev libldns-dev libedit-dev libopus-dev libmemcached-dev
|
||||
apt install -y libshout3-dev libmpg123-dev libmp3lame-dev yasm nasm libsndfile1-dev libuv1-dev libvpx-dev
|
||||
apt install -y libavformat-dev libswscale-dev libvlc-dev sox libsox-fmt-all
|
||||
apt install -y libtiff5-dev
|
||||
apt install -y libpcre3-dev
|
||||
|
||||
#install dependencies that depend on the operating system version
|
||||
if [ ."$os_codename" = ."noble" ]; then
|
||||
@@ -32,17 +34,17 @@ if [ ."$os_codename" = ."bullseye" ]; then
|
||||
apt install -y python3-distutils mlocate libvpx6 swig4.0
|
||||
fi
|
||||
if [ ."$os_codename" = ."trixie" ]; then
|
||||
apt install -y python3-distutils-extra plocate
|
||||
apt install -y python3-distutils-extra plocate libtiff-dev libpcre2-dev swig
|
||||
fi
|
||||
|
||||
# additional dependencies
|
||||
apt install -y sqlite3 unzip
|
||||
|
||||
#we are about to move out of the executing directory so we need to preserve it to return after we are done
|
||||
# preserve the executing directory, so we need to return after we are done
|
||||
CWD=$(pwd)
|
||||
|
||||
#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
|
||||
# install libks - dependency for switch versions greater than 1.10.0
|
||||
if [ ! -d /usr/src/libks ]; then
|
||||
|
||||
# libks build-requirements
|
||||
apt install -y cmake uuid-dev
|
||||
@@ -57,27 +59,39 @@ if [ ."$switch_version" = ."master" ] || [ $(echo "$switch_version" | tr -d '.')
|
||||
|
||||
# libks C includes
|
||||
export C_INCLUDE_PATH=/usr/include/libks
|
||||
fi
|
||||
|
||||
# sofia-sip
|
||||
# sofia-sip - dependency for switch versions greater than 1.10.0
|
||||
if [ ! -d /usr/src/sofia-sip ]; then
|
||||
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
|
||||
cd sofia-sip
|
||||
elif [ ."$os_codename" = ."trixie" ]; then
|
||||
git clone https://github.com/freeswitch/sofia-sip.git sofia-sip
|
||||
cd sofia-sip
|
||||
else
|
||||
wget https://github.com/freeswitch/sofia-sip/archive/refs/tags/v$sofia_version.zip
|
||||
unzip v$sofia_version.zip
|
||||
cd sofia-sip-$sofia_version
|
||||
mv sofia-sip-$sofia_version sofia-sip
|
||||
cd sofia-sip
|
||||
fi
|
||||
sh autogen.sh
|
||||
./configure --enable-debug
|
||||
make -j $(getconf _NPROCESSORS_ONLN)
|
||||
make install
|
||||
fi
|
||||
|
||||
# spandsp
|
||||
# spandsp - dependency for switch versions greater than 1.10.0
|
||||
if [ ! -d /usr/src/spandsp ]; then
|
||||
cd /usr/src
|
||||
git clone https://github.com/freeswitch/spandsp.git spandsp
|
||||
cd spandsp
|
||||
if [ ."$sofia_version" != ."master" ] && [ ."$os_codename" != ."trixie" ] && [ ."$switch_branch" != ."master" ]; then
|
||||
if [ ."$sofia_version" != ."master" ]; then
|
||||
echo ""
|
||||
elif [ ."$os_codename" = ."trixie" ]; then
|
||||
echo ""
|
||||
else
|
||||
git reset --hard 0d2e6ac65e0e8f53d652665a743015a88bf048d4
|
||||
fi
|
||||
#/usr/bin/sed -i 's/AC_PREREQ(\[2\.71\])/AC_PREREQ([2.69])/g' /usr/src/spandsp/configure.ac
|
||||
@@ -91,7 +105,7 @@ fi
|
||||
cd /usr/src
|
||||
|
||||
#check for master
|
||||
if [ ."$os_codename" = ."trixie" ] || [ ."$switch_branch" = ."master" ]; then
|
||||
if [ ."$switch_branch" = ."master" ]; then
|
||||
#master branch
|
||||
echo "Using version master"
|
||||
rm -r /usr/src/freeswitch
|
||||
@@ -100,51 +114,56 @@ if [ ."$os_codename" = ."trixie" ] || [ ."$switch_branch" = ."master" ]; then
|
||||
|
||||
git remote add fusionpbx https://github.com/fusionpbx/freeswitch.git
|
||||
git fetch fusionpbx
|
||||
git checkout -b $switch_version
|
||||
git checkout 1.10.12
|
||||
|
||||
git rebase fusionpbx/master
|
||||
./bootstrap.sh -j
|
||||
fi
|
||||
|
||||
#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"
|
||||
#1.8 and older
|
||||
if [ $(echo "$switch_version" | tr -d '.') -lt 1100 ]; then
|
||||
wget http://files.freeswitch.org/freeswitch-releases/freeswitch-$switch_version.zip
|
||||
unzip freeswitch-$switch_version.zip
|
||||
|
||||
# Get the source code using git
|
||||
if [ ."$switch_version" = ."1.11" ]; then
|
||||
git clone https://github.com/signalwire/freeswitch.git freeswitch-$switch_version
|
||||
|
||||
# Change the working directory
|
||||
cd /usr/src/freeswitch-$switch_version
|
||||
|
||||
# Reset repo just-in-case we are rebuilding
|
||||
git reset --hard HEAD && git clean -fdx
|
||||
# Get the stable branch
|
||||
git checkout v$switch_version
|
||||
fi
|
||||
|
||||
#1.10.0 and newer
|
||||
if [ $(echo "$switch_version" | tr -d '.') -gt 1100 ]; then
|
||||
|
||||
# Get the source code using git
|
||||
if [ ."$switch_version" = ."1.10.12" ]; then
|
||||
git clone https://github.com/fusionpbx/freeswitch freeswitch-$switch_version
|
||||
|
||||
# Change the working directory
|
||||
cd /usr/src/freeswitch-$switch_version
|
||||
|
||||
# Reset repo just-in-case we are rebuilding
|
||||
git reset --hard origin/master && git clean -fdx
|
||||
|
||||
#wget http://files.freeswitch.org/freeswitch-releases/freeswitch-$switch_version.-release.zip
|
||||
#unzip freeswitch-$switch_version.-release.zip
|
||||
#mv freeswitch-$switch_version.-release freeswitch-$switch_version
|
||||
|
||||
# bootstrap is needed if using git
|
||||
./bootstrap.sh -j
|
||||
|
||||
#apply rtp timestamp patch - Fix RTP audio issues use the following for additional information. https://github.com/briteback/freeswitch/commit/9f8968ccabb8a4e0353016d4ea0ff99561b005f1
|
||||
#patch -u /usr/src/freeswitch-$switch_version/src/switch_rtp.c -i /usr/src/fusionpbx-install.sh/debian/resources/switch/source/switch_rtp.diff
|
||||
|
||||
#apply pull request 2300 to Fix session deadlock that results in stale or stuck calls. https://github.com/signalwire/freeswitch/pull/2300
|
||||
#patch -d /usr/src/freeswitch-$switch_version/src -i /usr/src/fusionpbx-install.sh/debian/resources/switch/source/pull_2300.diff
|
||||
|
||||
#apply mod_pgsql patch
|
||||
#patch -u /usr/src/freeswitch-$switch_version/src/mod/databases/mod_pgsql/mod_pgsql.c -i /usr/src/fusionpbx-install.sh/debian/resources/switch/source/mod_pgsql.patch
|
||||
# Get the stable branch
|
||||
git checkout $switch_version
|
||||
fi
|
||||
|
||||
# Reset repo just-in-case we are rebuilding
|
||||
#git reset --hard origin/master && git clean -fdx
|
||||
|
||||
#wget http://files.freeswitch.org/freeswitch-releases/freeswitch-$switch_version.-release.zip
|
||||
#unzip freeswitch-$switch_version.-release.zip
|
||||
#mv freeswitch-$switch_version.-release freeswitch-$switch_version
|
||||
|
||||
# bootstrap is needed if using git
|
||||
./bootstrap.sh -j
|
||||
|
||||
#apply rtp timestamp patch - Fix RTP audio issues use the following for additional information. https://github.com/briteback/freeswitch/commit/9f8968ccabb8a4e0353016d4ea0ff99561b005f1
|
||||
#patch -u /usr/src/freeswitch-$switch_version/src/switch_rtp.c -i /usr/src/fusionpbx-install.sh/debian/resources/switch/source/switch_rtp.diff
|
||||
|
||||
#apply pull request 2300 to Fix session deadlock that results in stale or stuck calls. https://github.com/signalwire/freeswitch/pull/2300
|
||||
#patch -d /usr/src/freeswitch-$switch_version/src -i /usr/src/fusionpbx-install.sh/debian/resources/switch/source/pull_2300.diff
|
||||
|
||||
#apply mod_pgsql patch
|
||||
#patch -u /usr/src/freeswitch-$switch_version/src/mod/databases/mod_pgsql/mod_pgsql.c -i /usr/src/fusionpbx-install.sh/debian/resources/switch/source/mod_pgsql.patch
|
||||
fi
|
||||
|
||||
# enable required modules
|
||||
|
||||
52
debian/resources/switch/source-sounds.sh
vendored
52
debian/resources/switch/source-sounds.sh
vendored
@@ -1,20 +1,50 @@
|
||||
#!/bin/sh
|
||||
|
||||
#move to script directory so all relative paths work
|
||||
# Move to script directory so all relative paths work
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
#includes
|
||||
# Includes
|
||||
. ../config.sh
|
||||
. ../environment.sh
|
||||
|
||||
# change the working directory
|
||||
cd /usr/src/freeswitch-$switch_version
|
||||
# Make the sounds directory
|
||||
mkdir -p /usr/share/freeswitch/sounds
|
||||
|
||||
# compile and install the sounds
|
||||
make sounds-install moh-install
|
||||
make hd-sounds-install hd-moh-install
|
||||
make cd-sounds-install cd-moh-install
|
||||
# Change the working directory
|
||||
cd /usr/share/freeswitch/sounds
|
||||
|
||||
#move the music into music/default directory
|
||||
mkdir -p /usr/share/freeswitch/sounds/music/default
|
||||
mv /usr/share/freeswitch/sounds/music/*000 /usr/share/freeswitch/sounds/music/default
|
||||
# Make sure wget is installed
|
||||
apt-get install -y wget
|
||||
|
||||
# Array of sample rates
|
||||
sample_rates="48000 32000 16000 8000"
|
||||
|
||||
# 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
|
||||
|
||||
# Make the music directory
|
||||
mkdir -p /usr/share/freeswitch/sounds/music
|
||||
|
||||
# Change the current 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
|
||||
|
||||
31
debian/resources/upgrade/php.sh
vendored
31
debian/resources/upgrade/php.sh
vendored
@@ -7,34 +7,34 @@ cd "$(dirname "$0")"
|
||||
. ../config.sh
|
||||
|
||||
#remove php5
|
||||
/usr/bin/apt remove -y php5 php5-cli php5-fpm php5-pgsql php5-sqlite php5-odbc php5-curl php5-imap php5-gd
|
||||
/usr/bin/apt remove -y php5 php5-cli php5-fpm php5-pgsql php5-sqlite php5-odbc php5-curl php5-gd php5-imap
|
||||
|
||||
#remove php 7.0
|
||||
/usr/bin/apt remove -y php7.0 php7.0-cli php7.0-fpm php7.0-pgsql php7.0-sqlite3 php7.0-odbc php7.0-curl php7.0-imap php7.0-xml php7.0-gd
|
||||
/usr/bin/apt remove -y php7.0 php7.0-cli php7.0-fpm php7.0-pgsql php7.0-sqlite3 php7.0-odbc php7.0-curl php7.0-xml php7.0-gd php7.0-imap
|
||||
|
||||
#remove php 7.1
|
||||
/usr/bin/apt remove -y php7.1 php7.1-cli php7.1-fpm php7.1-pgsql php7.1-sqlite3 php7.1-odbc php7.1-curl php7.1-imap php7.1-xml php7.1-gd
|
||||
/usr/bin/apt remove -y php7.1 php7.1-cli php7.1-fpm php7.1-pgsql php7.1-sqlite3 php7.1-odbc php7.1-curl php7.1-xml php7.1-gd php7.1-imap
|
||||
|
||||
#remove php 7.2
|
||||
/usr/bin/apt remove -y php7.2 php7.2-cli php7.2-fpm php7.2-pgsql php7.2-sqlite3 php7.2-odbc php7.2-curl php7.2-imap php7.2-xml php7.2-gd
|
||||
/usr/bin/apt remove -y php7.2 php7.2-cli php7.2-fpm php7.2-pgsql php7.2-sqlite3 php7.2-odbc php7.2-curl php7.2-xml php7.2-gd php7.2-imap
|
||||
|
||||
#remove php 7.3
|
||||
/usr/bin/apt remove -y php7.3 php7.3-cli php7.3-fpm php7.3-pgsql php7.3-sqlite3 php7.3-odbc php7.3-curl php7.3-imap php7.3-xml php7.3-gd
|
||||
/usr/bin/apt remove -y php7.3 php7.3-cli php7.3-fpm php7.3-pgsql php7.3-sqlite3 php7.3-odbc php7.3-curl php7.3-xml php7.3-gd php7.3-imap
|
||||
|
||||
#remove php 7.4
|
||||
/usr/bin/apt remove -y php7.4 php7.4-cli php7.4-fpm php7.4-pgsql php7.4-sqlite3 php7.4-odbc php7.4-curl php7.4-imap php7.4-xml php7.4-gd
|
||||
/usr/bin/apt remove -y php7.4 php7.4-cli php7.4-fpm php7.4-pgsql php7.4-sqlite3 php7.4-odbc php7.4-curl php7.4-xml php7.4-gd php7.4-imap
|
||||
|
||||
#remove php 8.1
|
||||
/usr/bin/apt remove -y php8.1 php8.1-cli php8.1-dev php8.1-fpm php8.1-pgsql php8.1-sqlite3 php8.1-odbc php8.1-curl php8.1-imap php8.1-xml php8.1-gd php8.1-mbstring php8.1-ldap
|
||||
/usr/bin/apt remove -y php8.1 php8.1-cli php8.1-dev php8.1-fpm php8.1-pgsql php8.1-sqlite3 php8.1-odbc php8.1-curl php8.1-xml php8.1-gd php8.1-mbstring php8.1-ldap php8.1-imap
|
||||
|
||||
#remove php 8.2
|
||||
/usr/bin/apt remove -y php8.2 php8.2-cli php8.2-dev php8.2-fpm php8.2-pgsql php8.2-sqlite3 php8.2-odbc php8.2-curl php8.2-imap php8.2-xml php8.2-gd php8.2-mbstring php8.2-ldap
|
||||
/usr/bin/apt remove -y php8.2 php8.2-cli php8.2-dev php8.2-fpm php8.2-pgsql php8.2-sqlite3 php8.2-odbc php8.2-curl php8.2-xml php8.2-gd php8.2-mbstring php8.2-ldap php8.2-imap
|
||||
|
||||
#remove php 8.3
|
||||
/usr/bin/apt remove -y php8.3 php8.3-cli php8.3-dev php8.3-fpm php8.3-pgsql php8.3-sqlite3 php8.3-odbc php8.3-curl php8.3-imap php8.3-xml php8.3-gd php8.3-mbstring php8.3-ldap
|
||||
/usr/bin/apt remove -y php8.3 php8.3-cli php8.3-dev php8.3-fpm php8.3-pgsql php8.3-sqlite3 php8.3-odbc php8.3-curl php8.3-xml php8.3-gd php8.3-mbstring php8.3-ldap php8.3-imap
|
||||
|
||||
#remove php 8.4
|
||||
/usr/bin/apt remove -y php8.4 php8.4-cli php8.4-dev php8.4-fpm php8.4-pgsql php8.4-sqlite3 php8.4-odbc php8.4-curl php8.4-imap php8.4-xml php8.4-gd php8.4-mbstring php8.4-ldap
|
||||
/usr/bin/apt remove -y php8.4 php8.4-cli php8.4-dev php8.4-fpm php8.4-pgsql php8.4-sqlite3 php8.4-odbc php8.4-curl php8.4-xml php8.4-gd php8.4-mbstring php8.4-ldap php8.4-imap
|
||||
|
||||
#install php update and set the unix socket
|
||||
if [ ."$php_version" = ."8.4" ]; then
|
||||
@@ -45,7 +45,8 @@ if [ ."$php_version" = ."8.4" ]; then
|
||||
/usr/bin/apt-get update
|
||||
|
||||
#install php 8.4
|
||||
apt-get install -y php8.4 php8.4-cli php8.4-dev php8.4-fpm php8.4-pgsql php8.4-sqlite3 php8.4-odbc php8.4-curl php8.4-imap php8.4-xml php8.4-gd php8.4-mbstring php8.4-ldap
|
||||
apt-get install -y php8.4 php8.4-cli php8.4-dev php8.4-fpm php8.4-pgsql php8.4-sqlite3 php8.4-odbc php8.4-curl php8.4-xml php8.4-gd php8.4-mbstring php8.4-ldap
|
||||
apt-get install -y php8.4-imap
|
||||
|
||||
#update the unix socket name
|
||||
/usr/bin/sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php8.2-fpm.sock;#g'
|
||||
@@ -61,7 +62,7 @@ if [ ."$php_version" = ."8.3" ]; then
|
||||
/usr/bin/apt-get update
|
||||
|
||||
#install php 8.2
|
||||
apt-get install -y php8.3 php8.3-cli php8.3-dev php8.3-fpm php8.3-pgsql php8.3-sqlite3 php8.3-odbc php8.3-curl php8.3-imap php8.3-xml php8.3-gd php8.3-mbstring php8.3-ldap
|
||||
apt-get install -y php8.3 php8.3-cli php8.3-dev php8.3-fpm php8.3-pgsql php8.3-sqlite3 php8.3-odbc php8.3-curl php8.3-xml php8.3-gd php8.3-mbstring php8.3-ldap php8.3-imap
|
||||
|
||||
#update the unix socket name
|
||||
/usr/bin/sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php8.2-fpm.sock;#g'
|
||||
@@ -77,7 +78,7 @@ if [ ."$php_version" = ."8.2" ]; then
|
||||
/usr/bin/apt-get update
|
||||
|
||||
#install php 8.2
|
||||
apt-get install -y php8.2 php8.2-cli php8.2-dev php8.2-fpm php8.2-pgsql php8.2-sqlite3 php8.2-odbc php8.2-curl php8.2-imap php8.2-xml php8.2-gd php8.2-mbstring php8.2-ldap
|
||||
apt-get install -y php8.2 php8.2-cli php8.2-dev php8.2-fpm php8.2-pgsql php8.2-sqlite3 php8.2-odbc php8.2-curl php8.2-xml php8.2-gd php8.2-mbstring php8.2-ldap php8.2-imap
|
||||
|
||||
#update the unix socket name
|
||||
/usr/bin/sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php8.2-fpm.sock;#g'
|
||||
@@ -93,7 +94,7 @@ if [ ."$php_version" = ."8.1" ]; then
|
||||
/usr/bin/apt-get update
|
||||
|
||||
#install php 8.1
|
||||
/usr/bin/apt-get install -y php8.1 php8.1-cli php8.1-dev php8.1-fpm php8.1-pgsql php8.1-sqlite3 php8.1-odbc php8.1-curl php8.1-imap php8.1-xml php8.1-gd php8.1-mbstring php8.1-ldap
|
||||
/usr/bin/apt-get install -y php8.1 php8.1-cli php8.1-dev php8.1-fpm php8.1-pgsql php8.1-sqlite3 php8.1-odbc php8.1-curl php8.1-xml php8.1-gd php8.1-mbstring php8.1-ldap php8.1-imap
|
||||
|
||||
#update the unix socket name
|
||||
/usr/bin/sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php8.1-fpm.sock;#g'
|
||||
@@ -107,7 +108,7 @@ if [ ."$php_version" = ."7.4" ]; then
|
||||
/usr/bin/apt update
|
||||
|
||||
#install php 7.4
|
||||
/usr/bin/apt-get install -y php7.4 php7.4-cli php7.4-dev php7.4-fpm php7.4-pgsql php7.4-sqlite3 php7.4-odbc php7.4-curl php7.4-imap php7.4-xml php7.4-gd php7.4-mbstring php7.4-ldap
|
||||
/usr/bin/apt-get install -y php7.4 php7.4-cli php7.4-dev php7.4-fpm php7.4-pgsql php7.4-sqlite3 php7.4-odbc php7.4-curl php7.4-xml php7.4-gd php7.4-mbstring php7.4-ldap php7.4-imap
|
||||
|
||||
#update the unix socket name
|
||||
/usr/bin/sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php7.4-fpm.sock;#g'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.nsinnovations.net/nsinnovations/fusionpbx.gitvar/www/fusionpbx
|
||||
chown -R www-data:www-data /var/www/fusionpbx
|
||||
|
||||
@@ -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/
|
||||
|
||||
@@ -16,7 +16,7 @@ database_name=fusionpbx # Database name (safe characters A-Z, a-z, 0-9)
|
||||
database_username=fusionpbx # Database username (safe characters A-Z, a-z, 0-9)
|
||||
database_password=random # random or a custom value (safe characters A-Z, a-z, 0-9)
|
||||
database_enabled=true # true or false
|
||||
database_version=15 # Postgres 16, 15, 14, 13, 12
|
||||
database_version=18 # Postgres 18, 17, 16, 15, 14, 13, 12
|
||||
database_host=127.0.0.1 # hostname or IP address
|
||||
database_port=5432 # port number
|
||||
database_backup=false # true or false
|
||||
@@ -26,7 +26,7 @@ firewall_enabled=true # true or false
|
||||
|
||||
# General Settings
|
||||
interface_name=auto # auto, em0, igb0, vtnet0, or other valid names
|
||||
php_version=8.1 # PHP version 8.1, 7.4
|
||||
php_version=8.2 # PHP version 8.3, 8.2, 8.1, 7.4
|
||||
portsnap_enabled=false # true or false
|
||||
sngrep_enabled=true # true or false
|
||||
fail2ban_enabled=false # true or false
|
||||
|
||||
@@ -68,7 +68,7 @@ if [ .$nginx_enabled = .'true' ]; then
|
||||
|
||||
#update application defaults
|
||||
if [ .$nginx_enabled = .'true' ]; then
|
||||
cd /usr/local/www/fusionpbx && /usr/bin/php /var/www/fusionpbx/core/upgrade/upgrade.php --defaults
|
||||
cd /usr/local/www/fusionpbx && /usr/local/bin/php /usr/local/www/fusionpbx/core/upgrade/upgrade.php --defaults
|
||||
fi
|
||||
|
||||
#add the user
|
||||
@@ -97,11 +97,11 @@ if [ .$nginx_enabled = .'true' ]; then
|
||||
|
||||
#update application defaults
|
||||
if [ .$nginx_enabled = .'true' ]; then
|
||||
cd /usr/local/www/fusionpbx && /usr/bin/php /var/www/fusionpbx/core/upgrade/upgrade.php --defaults
|
||||
cd /usr/local/www/fusionpbx && /usr/local/bin/php /usr/local/www/fusionpbx/core/upgrade/upgrade.php --defaults
|
||||
fi
|
||||
|
||||
#update permissions
|
||||
#cd /var/www/fusionpbx && /usr/bin/php /var/www/fusionpbx/core/upgrade/upgrade.php --permissions
|
||||
#cd /usr/local/www/fusionpbx && /usr/local/bin/php /usr/local/www/fusionpbx/core/upgrade/upgrade.php --permissions
|
||||
|
||||
#reset the current working directory
|
||||
cd $cwd
|
||||
|
||||
@@ -27,5 +27,7 @@ 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.nsinnovations.net/nsinnovations/fusionpbx.gitusr/local/www/fusionpbx
|
||||
chown -R www:www /usr/local/www/fusionpbx
|
||||
cd /usr/local/www/fusionpbx
|
||||
git config --global --add safe.directory /usr/local/www/fusionpbx
|
||||
|
||||
@@ -14,27 +14,52 @@ echo "DEFAULT_VERSIONS+=ssl=openssl" >> /etc/make.conf
|
||||
#install dependencies
|
||||
if [ ."$php_version" = ."7.3" ]; then
|
||||
pkg install --yes php73 php73-phar php73-pdo php73-pdo_odbc php73-pdo_sqlite php73-json php73-gd php73-imap
|
||||
pkg install --yes php73-ldap php73-openssl php73-sockets php73-simplexml php73-xml php73-session php73-iconv
|
||||
pkg install --yes php73-zlib php73-filter php73-pdo_pgsql php73-pgsql php73-curl php73-mbstring
|
||||
pkg install --yes php73-posix php73-ldap php73-openssl php73-sockets php73-simplexml php73-xml php73-session php73-iconv
|
||||
pkg install --yes php73-pcntl php73-zlib php73-filter php73-pdo_pgsql php73-pgsql php73-curl php73-mbstring
|
||||
fi
|
||||
if [ ."$php_version" = ."7.4" ]; then
|
||||
pkg install --yes php74 php74-phar php74-pdo php74-pdo_odbc php74-pdo_sqlite php74-json php74-gd php74-imap
|
||||
pkg install --yes php74-ldap php74-openssl php74-sockets php74-simplexml php74-xml php74-session php74-iconv
|
||||
pkg install --yes php74-zlib php74-filter php74-pdo_pgsql php74-pgsql php74-curl php74-mbstring
|
||||
pkg install --yes php74-posix php74-pcntl php74-zlib php74-filter php74-pdo_pgsql php74-pgsql php74-curl php74-mbstring
|
||||
pkg install --yes php74-pdo_pgsql php74-pgsql
|
||||
fi
|
||||
if [ ."$php_version" = ."8.0" ]; then
|
||||
pkg install --yes php80 php80-phar php80-pdo php80-pdo_odbc php80-pdo_sqlite php80-gd php80-imap
|
||||
pkg install --yes php80-ldap php80-sockets php80-simplexml php80-xml php80-session php80-iconv
|
||||
pkg install --yes php80-zlib php80-filter php80-curl php80-mbstring
|
||||
pkg install --yes php80-posix php80-pcntl php80-zlib php80-filter php80-curl php80-mbstring
|
||||
pkg install --yes php80-pdo_pgsql php80-pgsql
|
||||
fi
|
||||
if [ ."$php_version" = ."8.1" ]; then
|
||||
pkg install --yes php81 php81-phar php81-pdo php81-pdo_odbc php81-pdo_sqlite php81-gd php81-imap
|
||||
pkg install --yes php81-ldap php81-sockets php81-simplexml php81-xml php81-session php81-iconv
|
||||
pkg install --yes php81-zlib php81-filter php81-curl php81-mbstring
|
||||
pkg install --yes php81-posix php81-pcntl php81-zlib php81-filter php81-curl php81-mbstring
|
||||
pkg install --yes php81-pdo_pgsql php81-pgsql
|
||||
fi
|
||||
if [ ."$php_version" = ."8.2" ]; then
|
||||
pkg install --yes php82 php82-phar php82-pdo php82-pdo_odbc php82-pdo_sqlite php82-gd php82-imap
|
||||
pkg install --yes php82-ldap php82-sockets php82-simplexml php82-xml php82-session php82-iconv
|
||||
pkg install --yes php82-posix php82-pcntl php82-zlib php82-filter php82-curl php82-mbstring
|
||||
pkg install --yes php82-pdo_pgsql php82-pgsql
|
||||
fi
|
||||
if [ ."$php_version" = ."8.3" ]; then
|
||||
pkg install --yes php83 php83-phar php83-pdo php83-pdo_odbc php83-pdo_sqlite php83-gd php83-imap
|
||||
pkg install --yes php83-ldap php83-sockets php83-simplexml php83-xml php83-session php83-iconv
|
||||
pkg install --yes php83-posix php83-pcntl php83-zlib php83-filter php83-curl php83-mbstring
|
||||
pkg install --yes php83-pdo_pgsql php83-pgsql
|
||||
fi
|
||||
if [ ."$php_version" = ."8.4" ]; then
|
||||
pkg install --yes php84 php84-phar php84-pdo php84-pdo_odbc php84-pdo_sqlite php84-gd
|
||||
pkg install --yes php84-ldap php84-sockets php84-simplexml php84-xml php84-session php84-iconv
|
||||
pkg install --yes php84-posix php84-pcntl php84-zlib php84-filter php84-curl php84-mbstring
|
||||
pkg install --yes php84-pdo_pgsql php84-pgsql
|
||||
pkg install --yes php84-imap
|
||||
fi
|
||||
if [ ."$php_version" = ."8.5" ]; then
|
||||
pkg install --yes php85 php85-phar php85-pdo php85-pdo_odbc php85-pdo_sqlite php85-gd php85-imap
|
||||
pkg install --yes php85-ldap php85-sockets php85-simplexml php85-xml php85-session php85-iconv
|
||||
pkg install --yes php85-posix php85-pcntl php85-zlib php85-filter php85-curl php85-mbstring
|
||||
pkg install --yes php85-pdo_pgsql php85-pgsql
|
||||
fi
|
||||
#send a message
|
||||
verbose "Configuring PHP"
|
||||
|
||||
|
||||
@@ -24,6 +24,14 @@ password=$(cat /dev/random | env LC_CTYPE=C tr -dc a-zA-Z0-9 | head -c 20)
|
||||
echo "Install PostgreSQL and create the database and users\n"
|
||||
|
||||
#postgres install
|
||||
if [ ."$database_version" = ."18" ]; then
|
||||
pkg install --yes postgresql18-server
|
||||
#cd /usr/ports/databases/postgresql18-server/ && make install clean BATCH=yes
|
||||
fi
|
||||
if [ ."$database_version" = ."17" ]; then
|
||||
pkg install --yes postgresql17-server
|
||||
#cd /usr/ports/databases/postgresql17-server/ && make install clean BATCH=yes
|
||||
fi
|
||||
if [ ."$database_version" = ."16" ]; then
|
||||
echo "IGNORE_DEPENDS=postgresql15-client" >> /usr/local/etc/pkg.conf
|
||||
pkg install --yes postgresql16-server
|
||||
@@ -53,6 +61,12 @@ echo 'postgresql_enable=true' >> /etc/rc.conf
|
||||
/usr/local/etc/rc.d/postgresql initdb
|
||||
|
||||
#start postgresql
|
||||
if [ ."$database_version" = ."18" ]; then
|
||||
sudo -u postgres /usr/local/bin/pg_ctl -D /var/db/postgres/data18 start
|
||||
fi
|
||||
if [ ."$database_version" = ."17" ]; then
|
||||
sudo -u postgres /usr/local/bin/pg_ctl -D /var/db/postgres/data17 start
|
||||
fi
|
||||
if [ ."$database_version" = ."16" ]; then
|
||||
sudo -u postgres /usr/local/bin/pg_ctl -D /var/db/postgres/data16 start
|
||||
fi
|
||||
|
||||
@@ -11,8 +11,8 @@ cd "$(dirname "$0")"
|
||||
# removes the cd img from the /etc/apt/sources.list file (not needed after base install)
|
||||
sed -i '/cdrom:/d' /etc/apt/sources.list
|
||||
|
||||
#Update to latest packages
|
||||
verbose "Update installed packages"
|
||||
#Update to the latest packages
|
||||
verbose "Update installed packages."
|
||||
apt-get update && apt-get upgrade -y
|
||||
|
||||
#Add dependencies
|
||||
@@ -25,6 +25,7 @@ apt-get install -y dialog
|
||||
apt-get install -y nano
|
||||
apt-get install -y nginx
|
||||
apt-get install -y build-essential
|
||||
apt-get install -y unzip
|
||||
|
||||
#SNMP
|
||||
apt-get install -y snmpd
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.nsinnovations.net/nsinnovations/fusionpbx.gitvar/www/fusionpbx
|
||||
chown -R www-data:www-data /var/www/fusionpbx
|
||||
|
||||
@@ -75,7 +75,8 @@ if [ ."$php_version" = ."8.3" ]; then
|
||||
apt-get install -y php8.3 php8.3-cli php8.3-fpm php8.3-pgsql php8.3-sqlite3 php8.3-odbc php8.3-curl php8.3-imap php8.3-xml php8.3-gd php8.3-mbstring
|
||||
fi
|
||||
if [ ."$php_version" = ."8.4" ]; then
|
||||
apt-get install -y php8.4 php8.4-cli php8.4-fpm php8.4-pgsql php8.4-sqlite3 php8.4-odbc php8.4-curl php8.4-imap php8.4-xml php8.4-gd php8.4-mbstring
|
||||
apt-get install -y php8.4 php8.4-cli php8.4-fpm php8.4-pgsql php8.4-sqlite3 php8.4-odbc php8.4-curl php8.4-xml php8.4-gd php8.4-mbstring
|
||||
apt-get install -y php8.4-imap
|
||||
fi
|
||||
|
||||
#update config if source is being used
|
||||
|
||||
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user