#!/bin/bash # Download the FusionPBX installer, modify it so that it works, then execute it wget https://raw.githubusercontent.com/fusionpbx/fusionpbx-install.sh/master/debian/pre-install.sh chmod +x pre-install.sh ./pre-install.sh aptitude -y install equivs echo -e "Section: misc\nPriority: optional\nStandards-Version: 3.9.2\n\nPackage: systemd-tmpfiles\nDescription: something to allow PHP 8.1 to install" >systemd-tmpfiles equivs-build systemd-tmpfiles dpkg -i systemd-tmpfiles_1.0_all.deb cd /usr/src/fusionpbx-install.sh/debian grep -q beowulf resources/environment.sh || sed -i 's/#cpu details/[ "$os_codename" = "ascii" ] \&\& os_codename=stretch\n[ "$os_codename" = "beowulf" ] \&\& os_codename=buster\n[ "$os_codename" = "chimaera" ] \&\& os_codename=bullseye\n\n#cpu details/' resources/environment.sh sed -i 's#/usr/bin/fs_cli#/bin/fs_cli#' resources/switch/source-master.sh sed -i 's/`lsb_release -sc`/$os_codename/; s/$(lsb_release -sc)/$os_codename/' `grep -rl lsb_release .` sed -i "s/sh -c '//; s/php.list'/php.list/" resources/php.sh resources/upgrade/php.sh sed -i 's#/usr/bin/##' `grep -lr /usr/bin/ resources` ./install.sh