fusionpbx-install.sh/centos/resources/fusionpbx.sh

39 lines
1.1 KiB
Bash
Raw Normal View History

2017-02-23 17:53:37 +01:00
#!/bin/sh
#move to script directory so all relative paths work
cd "$(dirname "$0")"
2017-04-23 09:29:42 +02:00
#includes
. ./config.sh
2017-02-23 17:53:37 +01:00
. ./colors.sh
2017-04-23 09:29:42 +02:00
#send a message
2017-02-23 17:53:37 +01:00
verbose "Installing FusionPBX"
2017-04-23 09:29:42 +02:00
#install dependencies
2017-02-23 17:53:37 +01:00
yum -y install git
yum -y install ghostscript libtiff-devel libtiff-tools
2017-04-23 09:29:42 +02:00
#forensics tools
2017-02-23 17:53:37 +01:00
wget https://forensics.cert.org/cert-forensics-tools-release-el7.rpm
rpm -Uvh cert-forensics-tools-release*rpm
yum -y --enablerepo=forensics install lame
2017-04-23 09:43:41 +02:00
#get the branch
2017-05-10 21:57:23 +02:00
if [ .$system_branch = .'master' ]; then
2017-02-23 17:53:37 +01:00
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_VERSION=$FUSION_MAJOR.$FUSION_MINOR
verbose "Using version $FUSION_VERSION"
BRANCH="-b $FUSION_VERSION"
fi
#get the source code
git clone $BRANCH https://github.com/fusionpbx/fusionpbx.git /var/www/fusionpbx
2017-04-23 09:29:42 +02:00
#send a message
2017-04-04 03:18:00 +02:00
verbose "FusionPBX Installed"