2017-03-25 18:41:47 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
|
|
#move to script directory so all relative paths work
|
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
|
|
2017-05-10 21:58:50 +02:00
|
|
|
#includes
|
2017-03-25 18:41:47 +01:00
|
|
|
. ./config.sh
|
|
|
|
|
. ./colors.sh
|
|
|
|
|
|
|
|
|
|
#send a message
|
|
|
|
|
verbose "Installing FusionPBX"
|
|
|
|
|
|
2020-05-20 19:35:52 +02:00
|
|
|
#install dependencies
|
|
|
|
|
pkg install --yes git
|
|
|
|
|
|
2017-05-10 21:58:50 +02:00
|
|
|
#set the version
|
2017-05-10 21:57:49 +02:00
|
|
|
if [ .$system_branch = .'master' ]; then
|
2017-03-25 18:41:47 +01:00
|
|
|
verbose "Using master"
|
|
|
|
|
branch=""
|
|
|
|
|
else
|
2018-04-06 07:08:56 +02:00
|
|
|
system_version=4.4
|
2017-03-25 18:41:47 +01:00
|
|
|
verbose "Using version $system_version"
|
|
|
|
|
branch="-b $system_version"
|
|
|
|
|
fi
|
|
|
|
|
|
2019-01-29 17:59:17 +01:00
|
|
|
#add the cache directory
|
|
|
|
|
mkdir -p /var/cache/fusionpbx
|
|
|
|
|
chown -R www:www /var/cache/fusionpbx
|
|
|
|
|
|
2017-03-25 18:41:47 +01:00
|
|
|
#get the source code
|
2017-03-27 10:28:40 +02:00
|
|
|
git clone $branch https://github.com/fusionpbx/fusionpbx.git /usr/local/www/fusionpbx
|
|
|
|
|
chown -R www:www /usr/local/www/fusionpbx
|