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

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

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

Revision 1.1 by jpp, Thu Dec 15 05:08:55 2022 UTC Revision 1.4 by jpp, Thu Dec 15 07:06:15 2022 UTC
# Line 1  Line 1 
1  diff -Nur --no-dereference smeserver-freepbx-14.old/createlinks smeserver-freepbx-14/createlinks  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  --- smeserver-freepbx-14.old/createlinks        2022-12-14 23:37:45.763000000 -0500
3  +++ smeserver-freepbx-14/createlinks    2022-12-15 00:07:43.397000000 -0500  +++ smeserver-freepbx-14/createlinks    2022-12-15 01:54:26.822000000 -0500
4  @@ -3,8 +3,8 @@  @@ -3,8 +3,8 @@
5   use esmith::Build::CreateLinks  qw(:all);   use esmith::Build::CreateLinks  qw(:all);
6    
# Line 20  diff -Nur --no-dereference smeserver-fre Line 20  diff -Nur --no-dereference smeserver-fre
20   templates2events("/etc/httpd/conf/httpd.conf", $event);   templates2events("/etc/httpd/conf/httpd.conf", $event);
21   templates2events("/etc/httpd/fpbx-conf/httpd.conf", qw(freepbx-update bootstrap-console-save conf-userpanel));   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));   templates2events("/etc/e-smith/sql/init/30freepbx_mysql_create_database", qw(freepbx-update bootstrap-console-save));
23  @@ -67,7 +68,7 @@  @@ -62,12 +63,13 @@
24     templates2events("/etc/asterisk/cdr_mysql.conf", $event);
25     templates2events("/etc/asterisk/manager.conf", $event);
26     templates2events("/etc/logrotate.d/asterisk", $event);
27    +templates2events("/etc/logrotate.d/vsftpd", $event);
28     templates2events("/etc/httpd/conf/httpd.conf", $event);
29     templates2events("/etc/httpd/fpbx-conf/httpd.conf", $event);
30   templates2events("/etc/e-smith/sql/init/30freepbx_mysql_create_database", $event);   templates2events("/etc/e-smith/sql/init/30freepbx_mysql_create_database", $event);
31   #templates2events("/etc/opt/remi/php56/php-fpm.d/www.conf", $event);   #templates2events("/etc/opt/remi/php56/php-fpm.d/www.conf", $event);
32   templates2events("/opt/remi/php56/root/etc/php-fpm.d/www.conf", $event);   templates2events("/opt/remi/php56/root/etc/php-fpm.d/www.conf", $event);
# Line 29  diff -Nur --no-dereference smeserver-fre Line 35  diff -Nur --no-dereference smeserver-fre
35    
36   event_link("freepbx-checkinstall", $event, "10");   event_link("freepbx-checkinstall", $event, "10");
37   event_link("freepbx-checkinstall-backup", $event, "11");   event_link("freepbx-checkinstall-backup", $event, "11");
38    diff -Nur --no-dereference smeserver-freepbx-14.old/root/etc/e-smith/events/actions/freepbx-amportal.conf smeserver-freepbx-14/root/etc/e-smith/events/actions/freepbx-amportal.conf
39    --- smeserver-freepbx-14.old/root/etc/e-smith/events/actions/freepbx-amportal.conf      2022-03-27 23:45:44.000000000 -0400
40    +++ smeserver-freepbx-14/root/etc/e-smith/events/actions/freepbx-amportal.conf  2022-12-15 01:50:09.007000000 -0500
41    @@ -1,5 +1,20 @@
42     #!/bin/bash
43    
44    +version=$(/usr/bin/xmllint --xpath 'string(/module/version)' /opt/freepbx/admin/modules/core/module.xml|cut -d. -f1)
45    +if [[ $version -ge 15 ]] ; then
46    +fwconsole="/sbin/e-smith/fwconsole"
47    +$fwconsole setting DISABLE_CSS_AUTOGEN 1
48    +$fwconsole setting CHECKREFERER 0
49    +$fwconsole setting AUTHTYPE none
50    +$fwconsole setting AMPWEBROOT /opt/freepbx
51    +$fwconsole setting MODULEADMINWGET 1
52    +$fwconsole setting DYNAMICHINTS 1
53    +$fwconsole setting ARI_ADMIN_PASSWORD $(/sbin/e-smith/db configuration getprop freepbx AriPassword) 2>/dev/null 1>&2
54    +$fwconsole setting AMPMGRPASS $(/sbin/e-smith/db configuration getprop freepbx ManagerPassword)
55    +$fwconsole setting RSSFEEDS 'http://www.freepbx.org/rss.xml'
56    +$fwconsole setting BRAND_FREEPBX_ALT_FOOT FreePBX
57    +
58    +else
59     # Change FreePBX database settings that should have come from /etc/amportal.conf,
60     # this is a dynamic template for FreePBX > 1.9 as it update the file on the fly, and also the db
61     FPBX_SETTING_PATH="/var/lib/asterisk/bin/freepbx_setting"
62    @@ -13,6 +28,6 @@
63     $FPBX_SETTING_PATH AMPMGRPASS $(/sbin/e-smith/db configuration getprop freepbx ManagerPassword)
64     $FPBX_SETTING_PATH RSSFEEDS 'http://www.freepbx.org/rss.xml'
65     $FPBX_SETTING_PATH BRAND_FREEPBX_ALT_FOOT FreePBX
66    -
67    +fi
68     # now regenrate the amportal.conf from mysql
69    -/var/lib/asterisk/bin/fwconsole r
70    +/sbin/e-smith/fwconsole r
71  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  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
72  --- smeserver-freepbx-14.old/root/etc/e-smith/events/actions/freepbx-checkinstall       2022-12-14 23:37:45.781000000 -0500  --- smeserver-freepbx-14.old/root/etc/e-smith/events/actions/freepbx-checkinstall       2022-12-14 23:37:45.781000000 -0500
73  +++ smeserver-freepbx-14/root/etc/e-smith/events/actions/freepbx-checkinstall   2022-12-14 23:40:43.021000000 -0500  +++ smeserver-freepbx-14/root/etc/e-smith/events/actions/freepbx-checkinstall   2022-12-15 01:50:08.759000000 -0500
74  @@ -53,6 +53,19 @@  @@ -53,19 +53,32 @@
75   # Upgrades have to be done through freePBX and the online repository   # Upgrades have to be done through freePBX and the online repository
76   if [ ! -d /opt/freepbx/admin ]; then   if [ ! -d /opt/freepbx/admin ]; then
77       mkdir -p /opt/freepbx       mkdir -p /opt/freepbx
# Line 41  diff -Nur --no-dereference smeserver-fre Line 80  diff -Nur --no-dereference smeserver-fre
80  +    php="/usr/bin/php74"  +    php="/usr/bin/php74"
81  +    if [[ $version -ge 16 ]]  +    if [[ $version -ge 16 ]]
82  +    then  +    then
83  +      php="/usr/bin/php80"  +      php="/usr/bin/php74"
84  +    elif [[ $version -lt 15 ]]  +    elif [[ $version -lt 15 ]]
85  +    then  +    then
86  +      php="/usr/bin/php56"  +      php="/usr/bin/php56"
# Line 52  diff -Nur --no-dereference smeserver-fre Line 91  diff -Nur --no-dereference smeserver-fre
91       if [ -e /usr/share/freepbx/sources/freepbx/ ]; then       if [ -e /usr/share/freepbx/sources/freepbx/ ]; then
92           cd /usr/share/freepbx/sources/freepbx/           cd /usr/share/freepbx/sources/freepbx/
93          echo "Starting Asterisk..." > /root/freepbx_install.log          echo "Starting Asterisk..." > /root/freepbx_install.log
94  @@ -101,7 +114,7 @@           ./start_asterisk start >> /root/freepbx_install.log 2>&1
95            echo "" >> /root/freepbx_install.log
96            echo "Installing FreePBX..." >> /root/freepbx_install.log
97    -       echo "a" | ./install --webroot="/opt/freepbx" \
98    +       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" \
99                    --dbengine="mysql" --dbname="freepbxdb" --dbuser="freepbxuser" --dbpass="$DBPASS" -n \
100                    --cdrdbname="$CDRDBNAME" --astmoddir=/usr/lib64/asterisk/modules/ \
101                    --astagidir=/usr/share/asterisk/agi-bin/ --ampsbin=/usr/sbin --ampcgibin=/opt/freepbx/cgi-bin \
102                    >> /root/freepbx_install.log 2>&1
103            else
104    -               echo "error: /usr/share/freepbx/sources/freepbx/ doesn't exists"
105    +               echo "error: /usr/share/freepbx/sources/freepbx/ doesn't exists"
106                    exit 1
107            fi
108     else
109    @@ -95,19 +108,21 @@
110     php="/usr/bin/php74"
111     if [[ $version -ge 16 ]]
112     then
113    -  php="/usr/bin/php80"
114    +  #version we have is not fully compatible, need newer source
115    +  php="/usr/bin/php74"
116     elif [[ $version -lt 15 ]]
117     then
118     php="/usr/bin/php56"     php="/usr/bin/php56"
119   fi   fi
120   ln -sf $php /usr/sbin/php   ln -sf $php /usr/sbin/php
# Line 60  diff -Nur --no-dereference smeserver-fre Line 122  diff -Nur --no-dereference smeserver-fre
122  +ln -sf $php /usr/local/sbin/php  +ln -sf $php /usr/local/sbin/php
123    
124   # update modules   # update modules
125   /usr/sbin/e-smith/fwconsole ma upgrade framework  -/usr/sbin/e-smith/fwconsole ma upgrade framework
126    -/usr/sbin/e-smith/fwconsole ma upgradeall -R standard -R extended
127    -/usr/sbin/e-smith/fwconsole ma refreshsignatures
128    -/usr/sbin/e-smith/fwconsole ma downloadinstall userman certman
129    +/usr/sbin/e-smith/fwconsole ma upgrade framework 2>/dev/null
130    +/usr/sbin/e-smith/fwconsole ma upgrade core 2>/dev/null
131    +/usr/sbin/e-smith/fwconsole ma upgradeall -R standard -R extended 2>/dev/null
132    +/usr/sbin/e-smith/fwconsole ma refreshsignatures 2>/dev/null
133    +/usr/sbin/e-smith/fwconsole ma downloadinstall userman certman arimanager 2>/dev/null
134     /usr/sbin/e-smith/fwconsole ma downloadinstall ucp 2>/dev/null
135    
136     exit 0
137    diff -Nur --no-dereference smeserver-freepbx-14.old/root/etc/e-smith/events/actions/freepbx-checkinstall-backup smeserver-freepbx-14/root/etc/e-smith/events/actions/freepbx-checkinstall-backup
138    --- smeserver-freepbx-14.old/root/etc/e-smith/events/actions/freepbx-checkinstall-backup        2022-12-14 23:37:45.782000000 -0500
139    +++ smeserver-freepbx-14/root/etc/e-smith/events/actions/freepbx-checkinstall-backup    2022-12-15 02:05:02.315000000 -0500
140    @@ -56,6 +56,16 @@
141       if [ -z $backupid ] ; then
142         backupid=$(/usr/bin/uuidgen)
143         echo "creating new backup id $backupid"
144    +
145    +    mysql -e "use $DBNAME; CREATE TABLE IF NOT EXISTS \`kvstore_FreePBX_modules_Backup\` (
146    +  \`key\` char(255) NOT NULL,
147    +  \`val\` varchar(4096) DEFAULT NULL,
148    +  \`type\` char(16) DEFAULT NULL,
149    +  \`id\` char(255) DEFAULT NULL,
150    +  UNIQUE KEY \`uniqueindex\` (\`key\`(190),\`id\`(190)),
151    +  KEY \`keyindex\` (\`key\`(190)),
152    +  KEY \`idindex\` (\`id\`(190))
153    +) ENGINE=InnoDB DEFAULT CHARSET=utf8;"
154        
155         ##TODO SELECT * FROM `kvblobstore` WHERE `uuid` LIKE 'a9fe727b-fc4c-40c4-ad45-bcabd075302a'
156         ### TODO : list modules enabled and populate
157    @@ -155,7 +165,7 @@
158     #('backup_items', 'a9fe727b-fc4c-40c4-ad45-bcabd075302a', 'blob', '$backupid')
159     #ON DUPLICATE KEY UPDATE val=VALUES(val);"
160    
161    -else
162    +elif [[ $version -lt 15 ]] ; then
163       # set first backup as the one for SME way
164       # set destination
165       mysql -e "use $DBNAME;UPDATE backup_server_details set value = '/home/e-smith/files/freepbx' WHERE server_id = 1;"
166    diff -Nur --no-dereference smeserver-freepbx-14.old/root/etc/e-smith/templates/etc/logrotate.d/vsftpd/10info smeserver-freepbx-14/root/etc/e-smith/templates/etc/logrotate.d/vsftpd/10info
167    --- smeserver-freepbx-14.old/root/etc/e-smith/templates/etc/logrotate.d/vsftpd/10info   1969-12-31 19:00:00.000000000 -0500
168    +++ smeserver-freepbx-14/root/etc/e-smith/templates/etc/logrotate.d/vsftpd/10info       2022-12-15 01:53:26.738000000 -0500
169    @@ -0,0 +1 @@
170    +# /var/log/xferlog already handled in /etc/logrotate.d/proftpd
171  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  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
172  --- smeserver-freepbx-14.old/root/etc/e-smith/templates/etc/odbc.ini/10freepbx  1969-12-31 19:00:00.000000000 -0500  --- smeserver-freepbx-14.old/root/etc/e-smith/templates/etc/odbc.ini/10freepbx  1969-12-31 19:00:00.000000000 -0500
173  +++ smeserver-freepbx-14/root/etc/e-smith/templates/etc/odbc.ini/10freepbx      2022-12-15 00:06:39.445000000 -0500  +++ smeserver-freepbx-14/root/etc/e-smith/templates/etc/odbc.ini/10freepbx      2022-12-15 00:06:39.445000000 -0500


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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