Fork of FusionPBX but with LDAP kinda working
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.1 KiB

  1. #!/bin/sh
  2. #move to script directory so all relative paths work
  3. cd "$(dirname "$0")"
  4. #includes
  5. . ./config.sh
  6. . ./colors.sh
  7. #send a message
  8. verbose "Installing FusionPBX"
  9. #install dependencies
  10. apt-get install -y vim git dbus haveged ssl-cert qrencode
  11. apt-get install -y ghostscript libtiff5-dev libtiff-tools at
  12. #get the branch
  13. if [ .$system_branch = .'master' ]; then
  14. verbose "Using master"
  15. branch=""
  16. else
  17. 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)
  18. 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)
  19. system_version=$system_major.$system_minor
  20. verbose "Using version $system_version"
  21. branch="-b $system_version"
  22. fi
  23. #add the cache directory
  24. mkdir -p /var/cache/fusionpbx
  25. chown -R www-data:www-data /var/cache/fusionpbx
  26. #get the source code
  27. git clone $branch https://github.com/fusionpbx/fusionpbx.git /var/www/fusionpbx
  28. chown -R www-data:www-data /var/www/fusionpbx