Pārlūkot izejas kodu

Ubuntu 20.04 (#367)

* Ubuntu 20.04 LTS

For #363

* Update php.sh

* Ubuntu 20.04

* Update nginx.sh

* Update php.sh

* Update source-release.sh

* Update source-release.sh

* Update etc.default.freeswitch.source

Co-authored-by: FusionPBX <[email protected]>
alex-eri 4 gadi atpakaļ
vecāks
revīzija
35ba464189

+ 1 - 1
ubuntu/resources/config.sh

@@ -21,5 +21,5 @@ database_port=5432              # port number
 database_backup=false           # true or false
 database_backup=false           # true or false
 
 
 # General Settings
 # General Settings
-php_version=7.2                 # PHP version 5.6 or 7.0, 7.1, 7.2
+php_version=7.4                 # PHP version 5.6 or 7.0, 7.1, 7.2
 letsencrypt_folder=true         # true or false
 letsencrypt_folder=true         # true or false

+ 3 - 0
ubuntu/resources/nginx.sh

@@ -38,6 +38,9 @@ fi
 if [ ."$php_version" = ."7.2" ]; then
 if [ ."$php_version" = ."7.2" ]; then
         sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php7.2-fpm.sock;#g'
         sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php7.2-fpm.sock;#g'
 fi
 fi
+if [ ."$php_version" = ."7.4" ]; then
+        sed -i /etc/nginx/sites-available/fusionpbx -e 's#unix:.*;#unix:/var/run/php/php7.4-fpm.sock;#g'
+fi
 ln -s /etc/nginx/sites-available/fusionpbx /etc/nginx/sites-enabled/fusionpbx
 ln -s /etc/nginx/sites-available/fusionpbx /etc/nginx/sites-enabled/fusionpbx
 
 
 #self signed certificate
 #self signed certificate

+ 14 - 3
ubuntu/resources/php.sh

@@ -13,6 +13,11 @@ verbose "Configuring PHP"
 
 
 #add the repository
 #add the repository
 if [ ."$os_name" = ."Ubuntu" ]; then
 if [ ."$os_name" = ."Ubuntu" ]; then
+	#20.04.x - /*bionic/
+        if [ ."$os_codename" = ."focal" ]; then
+                echo "Ubuntu 20.04 LTS\n"
+		php_version=7.4
+        fi
 	#18.04.x - /*bionic/
 	#18.04.x - /*bionic/
         if [ ."$os_codename" = ."bionic" ]; then
         if [ ."$os_codename" = ."bionic" ]; then
                 echo "Ubuntu 18.04 LTS\n"
                 echo "Ubuntu 18.04 LTS\n"
@@ -44,8 +49,8 @@ fi
 if [ ."$php_version" = ."7.2" ]; then
 if [ ."$php_version" = ."7.2" ]; then
         apt-get install -y php7.2 php7.2-cli php7.2-fpm php7.2-pgsql php7.2-sqlite3 php7.2-odbc php7.2-curl php7.2-imap php7.2-xml php7.2-gd
         apt-get install -y php7.2 php7.2-cli php7.2-fpm php7.2-pgsql php7.2-sqlite3 php7.2-odbc php7.2-curl php7.2-imap php7.2-xml php7.2-gd
 fi
 fi
-if [ ."$php_version" = ."7.3" ]; then
-        apt-get install -y php7.3 php7.3-cli php7.3-fpm php7.3-pgsql php7.3-sqlite3 php7.3-odbc php7.3-curl php7.3-imap php7.3-xml php7.3-gd
+if [ ."$php_version" = ."7.4" ]; then
+        apt-get install -y php7.4 php7.4-cli php7.4-fpm php7.4-pgsql php7.4-sqlite3 php7.4-odbc php7.4-curl php7.4-imap php7.4-xml php7.4-gd
 fi
 fi
 
 
 #update config if source is being used
 #update config if source is being used
@@ -65,6 +70,10 @@ if [ ."$php_version" = ."7.2" ]; then
         verbose "version 7.2"
         verbose "version 7.2"
         php_ini_file='/etc/php/7.2/fpm/php.ini'
         php_ini_file='/etc/php/7.2/fpm/php.ini'
 fi
 fi
+if [ ."$php_version" = ."7.4" ]; then
+        verbose "version 7.4"
+        php_ini_file='/etc/php/7.4/fpm/php.ini'
+fi
 sed 's#post_max_size = .*#post_max_size = 80M#g' -i $php_ini_file
 sed 's#post_max_size = .*#post_max_size = 80M#g' -i $php_ini_file
 sed 's#upload_max_filesize = .*#upload_max_filesize = 80M#g' -i $php_ini_file
 sed 's#upload_max_filesize = .*#upload_max_filesize = 80M#g' -i $php_ini_file
 sed 's#; max_input_vars = .*#max_input_vars = 8000#g' -i $php_ini_file
 sed 's#; max_input_vars = .*#max_input_vars = 8000#g' -i $php_ini_file
@@ -88,7 +97,9 @@ fi
 if [ ."$php_version" = ."7.2" ]; then
 if [ ."$php_version" = ."7.2" ]; then
         systemctl restart php7.2-fpm
         systemctl restart php7.2-fpm
 fi
 fi
-
+if [ ."$php_version" = ."7.4" ]; then
+        systemctl restart php7.4-fpm
+fi
 #init.d
 #init.d
 #/usr/sbin/service php5-fpm restart
 #/usr/sbin/service php5-fpm restart
 #/usr/sbin/service php7.0-fpm restart
 #/usr/sbin/service php7.0-fpm restart

+ 13 - 8
ubuntu/resources/switch/source-release.sh

@@ -10,12 +10,12 @@ cd "$(dirname "$0")"
 apt update && apt upgrade -y
 apt update && apt upgrade -y
 
 
 # install dependencies
 # install dependencies
-apt install -y autoconf automake devscripts g++ git-core libncurses5-dev libtool make libjpeg-dev 
-apt install -y pkg-config flac  libgdbm-dev libdb-dev gettext sudo equivs mlocate git dpkg-dev libpq-dev
-apt install -y liblua5.2-dev libtiff5-dev libperl-dev libcurl4-openssl-dev libsqlite3-dev libpcre3-dev
-apt install -y devscripts libspeexdsp-dev libspeex-dev libldns-dev libedit-dev libopus-dev libmemcached-dev
-apt install -y libshout3-dev libmpg123-dev libmp3lame-dev yasm nasm libsndfile1-dev libuv1-dev libvpx-dev libvpx5
-apt install -y libavformat-dev libswscale-dev
+apt install -y autoconf automake devscripts g++ git-core libncurses5-dev libtool make libjpeg-dev \
+  pkg-config flac  libgdbm-dev libdb-dev gettext sudo equivs mlocate git dpkg-dev libpq-dev \
+  liblua5.2-dev libtiff5-dev libperl-dev libcurl4-openssl-dev libsqlite3-dev libpcre3-dev \
+  devscripts libspeexdsp-dev libspeex-dev libldns-dev libedit-dev libopus-dev libmemcached-dev \
+  libshout3-dev libmpg123-dev libmp3lame-dev yasm nasm libsndfile1-dev libuv1-dev libvpx-dev \
+  libavformat-dev libswscale-dev libspandsp3-dev
 
 
 # additional dependencies
 # additional dependencies
 apt install -y swig3.0 unzip sox wget
 apt install -y swig3.0 unzip sox wget
@@ -32,11 +32,11 @@ cd /usr/src
 #mv freeswitch-$switch_version freeswitch
 #mv freeswitch-$switch_version freeswitch
 #cd /usr/src/freeswitch
 #cd /usr/src/freeswitch
 #1.10.0 and newer
 #1.10.0 and newer
-wget http://files.freeswitch.org/freeswitch-releases/freeswitch-$switch_version.-release.zip
+wget http://files.freeswitch.org/freeswitch-releases/freeswitch-$switch_version.-release.zip -O freeswitch-$switch_version.-release.zip
 unzip freeswitch-$switch_version.-release.zip
 unzip freeswitch-$switch_version.-release.zip
 rm -R freeswitch
 rm -R freeswitch
 mv freeswitch-$switch_version.-release freeswitch
 mv freeswitch-$switch_version.-release freeswitch
-cd /usr/src/freeswitch
+pushd /usr/src/freeswitch
 
 
 # bootstrap is needed if using git
 # bootstrap is needed if using git
 #./bootstrap.sh -j
 #./bootstrap.sh -j
@@ -61,11 +61,16 @@ sed -i /usr/src/freeswitch/modules.conf -e s:'applications/mod_signalwire:#appli
 
 
 # compile and install
 # compile and install
 make
 make
+
+rm -rf /usr/share/freeswitch/sounds/music/default
+
 make install
 make install
 make sounds-install moh-install
 make sounds-install moh-install
 make hd-sounds-install hd-moh-install
 make hd-sounds-install hd-moh-install
 make cd-sounds-install cd-moh-install
 make cd-sounds-install cd-moh-install
 
 
+popd
+
 #move the music into music/default directory
 #move the music into music/default directory
 mkdir -p /usr/share/freeswitch/sounds/music/default
 mkdir -p /usr/share/freeswitch/sounds/music/default
 mv /usr/share/freeswitch/sounds/music/*000 /usr/share/freeswitch/sounds/music/default
 mv /usr/share/freeswitch/sounds/music/*000 /usr/share/freeswitch/sounds/music/default

+ 1 - 1
ubuntu/resources/switch/source/etc.default.freeswitch.source

@@ -1,4 +1,4 @@
 # /etc/default/freeswitch
 # /etc/default/freeswitch
 FS_USER="www-data"
 FS_USER="www-data"
 FS_GROUP="www-data"
 FS_GROUP="www-data"
-DAEMON_OPTS="-nonat -ncwait -u www-data -g www-data"
+DAEMON_OPTS="DAEMON_OPTS="-run /var/run/freeswitch -scripts /var/www/fusionpbx/app/scripts/resources/scripts/"