/[smecontribs]/rpms/smeserver-freepbx/contribs10/smeserver-freepbx-14-go15.patch
ViewVC logotype

Annotation of /rpms/smeserver-freepbx/contribs10/smeserver-freepbx-14-go15.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Thu Dec 15 05:18:58 2022 UTC (22 months, 3 weeks ago) by jpp
Branch: MAIN
Changes since 1.1: +28 -5 lines
* Wed Dec 14 2022 Jean-Philippe Pialasse <tests@pialasse.com> 14-11.sme
- fix bugs installing FPBX 15

1 jpp 1.1 diff -Nur --no-dereference smeserver-freepbx-14.old/createlinks smeserver-freepbx-14/createlinks
2     --- smeserver-freepbx-14.old/createlinks 2022-12-14 23:37:45.763000000 -0500
3 jpp 1.2 +++ smeserver-freepbx-14/createlinks 2022-12-15 00:17:45.820000000 -0500
4 jpp 1.1 @@ -3,8 +3,8 @@
5     use esmith::Build::CreateLinks qw(:all);
6    
7     # force default php to php56
8     -safe_symlink("/usr/bin/php56", "root/usr/sbin/php");
9     -safe_symlink("/usr/bin/php56", "root/usr/local/sbin/php");
10     +safe_symlink("/usr/bin/php74", "root/usr/sbin/php");
11     +safe_symlink("/usr/bin/php74", "root/usr/local/sbin/php");
12    
13     #safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/httpd-fpbx');
14     #safe_symlink("/var/service/httpd-fpbx" , 'root/service/httpd-fpbx');
15     @@ -21,6 +21,7 @@
16     templates2events("/etc/asterisk/cdr_mysql.conf", qw(freepbx-update bootstrap-console-save));
17     templates2events("/etc/asterisk/manager.conf", qw(freepbx-update bootstrap-console-save));
18     templates2events("/etc/logrotate.d/asterisk", qw(freepbx-update bootstrap-console-save));
19     +templates2events("/etc/odbc.ini", qw(freepbx-update bootstrap-console-save));
20     templates2events("/etc/httpd/conf/httpd.conf", $event);
21     templates2events("/etc/httpd/fpbx-conf/httpd.conf", qw(freepbx-update bootstrap-console-save conf-userpanel));
22     templates2events("/etc/e-smith/sql/init/30freepbx_mysql_create_database", qw(freepbx-update bootstrap-console-save));
23     @@ -67,7 +68,7 @@
24     templates2events("/etc/e-smith/sql/init/30freepbx_mysql_create_database", $event);
25     #templates2events("/etc/opt/remi/php56/php-fpm.d/www.conf", $event);
26     templates2events("/opt/remi/php56/root/etc/php-fpm.d/www.conf", $event);
27     -
28     +templates2events("/etc/odbc.ini", $event);
29    
30     event_link("freepbx-checkinstall", $event, "10");
31     event_link("freepbx-checkinstall-backup", $event, "11");
32     diff -Nur --no-dereference smeserver-freepbx-14.old/root/etc/e-smith/events/actions/freepbx-checkinstall smeserver-freepbx-14/root/etc/e-smith/events/actions/freepbx-checkinstall
33     --- smeserver-freepbx-14.old/root/etc/e-smith/events/actions/freepbx-checkinstall 2022-12-14 23:37:45.781000000 -0500
34 jpp 1.2 +++ smeserver-freepbx-14/root/etc/e-smith/events/actions/freepbx-checkinstall 2022-12-15 00:17:35.927000000 -0500
35     @@ -53,19 +53,32 @@
36 jpp 1.1 # Upgrades have to be done through freePBX and the online repository
37     if [ ! -d /opt/freepbx/admin ]; then
38     mkdir -p /opt/freepbx
39     + # we need the right php version available
40     + version=$(/usr/bin/rpm -q freepbx-src --qf "%{version}"|cut -d. -f1)
41     + php="/usr/bin/php74"
42     + if [[ $version -ge 16 ]]
43     + then
44 jpp 1.2 + php="/usr/bin/php74"
45 jpp 1.1 + elif [[ $version -lt 15 ]]
46     + then
47     + php="/usr/bin/php56"
48     + fi
49     + ln -sf $php /usr/sbin/php
50     + ln -sf $php /usr/local/sbin/php
51     +
52     if [ -e /usr/share/freepbx/sources/freepbx/ ]; then
53     cd /usr/share/freepbx/sources/freepbx/
54     echo "Starting Asterisk..." > /root/freepbx_install.log
55 jpp 1.2 ./start_asterisk start >> /root/freepbx_install.log 2>&1
56     echo "" >> /root/freepbx_install.log
57     echo "Installing FreePBX..." >> /root/freepbx_install.log
58     - echo "a" | ./install --webroot="/opt/freepbx" \
59     + echo "a" |$php --define sys_temp_dir=/var/spool/asterisk/tmp/ --define allow_url_fopen=1 --define memory_limit=256M /usr/share/freepbx/sources/freepbx/install --webroot="/opt/freepbx" \
60     --dbengine="mysql" --dbname="freepbxdb" --dbuser="freepbxuser" --dbpass="$DBPASS" -n \
61     --cdrdbname="$CDRDBNAME" --astmoddir=/usr/lib64/asterisk/modules/ \
62     --astagidir=/usr/share/asterisk/agi-bin/ --ampsbin=/usr/sbin --ampcgibin=/opt/freepbx/cgi-bin \
63     >> /root/freepbx_install.log 2>&1
64     else
65     - echo "error: /usr/share/freepbx/sources/freepbx/ doesn't exists"
66     + echo "error: /usr/share/freepbx/sources/freepbx/ doesn't exists"
67     exit 1
68     fi
69     else
70     @@ -95,13 +108,14 @@
71     php="/usr/bin/php74"
72     if [[ $version -ge 16 ]]
73     then
74     - php="/usr/bin/php80"
75     + #version we have is not fully compatible, need newer source
76     + php="/usr/bin/php74"
77     elif [[ $version -lt 15 ]]
78     then
79 jpp 1.1 php="/usr/bin/php56"
80     fi
81     ln -sf $php /usr/sbin/php
82     -
83     +ln -sf $php /usr/local/sbin/php
84    
85     # update modules
86     /usr/sbin/e-smith/fwconsole ma upgrade framework
87     diff -Nur --no-dereference smeserver-freepbx-14.old/root/etc/e-smith/templates/etc/odbc.ini/10freepbx smeserver-freepbx-14/root/etc/e-smith/templates/etc/odbc.ini/10freepbx
88     --- smeserver-freepbx-14.old/root/etc/e-smith/templates/etc/odbc.ini/10freepbx 1969-12-31 19:00:00.000000000 -0500
89     +++ smeserver-freepbx-14/root/etc/e-smith/templates/etc/odbc.ini/10freepbx 2022-12-15 00:06:39.445000000 -0500
90     @@ -0,0 +1,12 @@
91     +[MySQL-{ ${freepbx}{CdrDbName} || 'asteriskcdrdb' }]
92     +Description=MySQL connection to '{ ${freepbx}{CdrDbName} || 'asteriskcdrdb' }' database
93     +driver=MySQL
94     +server=localhost
95     +database={ ${freepbx}{CdrDbName} || 'asteriskcdrdb' }
96     +Port=3306
97     +Socket=/var/lib/mysql/mysql.sock
98     +option=3
99     +Charset=utf8
100     +User = { ${freepbx}{DbUser} || 'freepbxuser'}
101     +Password = { ${freepbx}{DbPassword} || 'freepbxuser'}
102     +

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed