Last active
August 2, 2021 20:32
-
-
Save worldadventurer/92b77e971ee4f52280b6a6cfc00905a6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This will upgrade your FreePBX install to the latest build. | |
# Tested on FreePBX 13 iso on CentOS | |
# Source: https://wiki.freepbx.org/display/PPS/FreePBX-Distro-10.13.66?focusedCommentId=69075041#comment-69075041 | |
ugdir=/root/upgradescripts | |
if [ ! -d $ugdir ] | |
then | |
mkdir $ugdir | |
fi | |
version=`cat /etc/schmooze/pbx-version` | |
base=`echo $version | cut -f1 -d'-'` | |
build=`echo $version | cut -f2 -d'-'` | |
echo "" | |
echo ---------------------------------------- | |
echo Current FreePBX version is $version | |
echo Base=$base and Build=$build | |
echo Checking for updates... | |
echo ---------------------------------------- | |
echo "" | |
error=0 | |
while [ $error = 0 ] | |
do | |
build=`expr $build + 1` | |
wget http://upgrades.freepbxdistro.org/stable/$base/upgrade-$base-$build.sh -O $ugdir/upgrade-$base-$build.sh | |
error=$? | |
if [ $error = 0 ] | |
then | |
echo Upgrading to $base-$build now | |
chmod +x $ugdir/upgrade-$base-$build.sh | |
$ugdir/upgrade-$base-$build.sh | |
fi | |
done | |
echo "" | |
echo ---------------------------------------- | |
echo Finished. | |
echo All the FreePBX modules have been installed again. Uninstall any unnecessary modules now. | |
echo ---------------------------------------- | |
echo "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment