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 |
+++ smeserver-freepbx-14/createlinks 2022-12-15 01:54:26.822000000 -0500 |
4 |
@@ -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 |
@@ -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); |
31 |
#templates2events("/etc/opt/remi/php56/php-fpm.d/www.conf", $event); |
32 |
templates2events("/opt/remi/php56/root/etc/php-fpm.d/www.conf", $event); |
33 |
- |
34 |
+templates2events("/etc/odbc.ini", $event); |
35 |
|
36 |
event_link("freepbx-checkinstall", $event, "10"); |
37 |
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 |
72 |
--- 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-15 01:50:08.759000000 -0500 |
74 |
@@ -53,19 +53,32 @@ |
75 |
# Upgrades have to be done through freePBX and the online repository |
76 |
if [ ! -d /opt/freepbx/admin ]; then |
77 |
mkdir -p /opt/freepbx |
78 |
+ # we need the right php version available |
79 |
+ version=$(/usr/bin/rpm -q freepbx-src --qf "%{version}"|cut -d. -f1) |
80 |
+ php="/usr/bin/php74" |
81 |
+ if [[ $version -ge 16 ]] |
82 |
+ then |
83 |
+ php="/usr/bin/php74" |
84 |
+ elif [[ $version -lt 15 ]] |
85 |
+ then |
86 |
+ php="/usr/bin/php56" |
87 |
+ fi |
88 |
+ ln -sf $php /usr/sbin/php |
89 |
+ ln -sf $php /usr/local/sbin/php |
90 |
+ |
91 |
if [ -e /usr/share/freepbx/sources/freepbx/ ]; then |
92 |
cd /usr/share/freepbx/sources/freepbx/ |
93 |
echo "Starting Asterisk..." > /root/freepbx_install.log |
94 |
./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" |
119 |
fi |
120 |
ln -sf $php /usr/sbin/php |
121 |
- |
122 |
+ln -sf $php /usr/local/sbin/php |
123 |
|
124 |
# update modules |
125 |
-/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/templates/etc/logrotate.d/vsftpd/10info smeserver-freepbx-14/root/etc/e-smith/templates/etc/logrotate.d/vsftpd/10info |
138 |
--- smeserver-freepbx-14.old/root/etc/e-smith/templates/etc/logrotate.d/vsftpd/10info 1969-12-31 19:00:00.000000000 -0500 |
139 |
+++ smeserver-freepbx-14/root/etc/e-smith/templates/etc/logrotate.d/vsftpd/10info 2022-12-15 01:53:26.738000000 -0500 |
140 |
@@ -0,0 +1 @@ |
141 |
+# /var/log/xferlog already handled in /etc/logrotate.d/proftpd |
142 |
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 |
143 |
--- smeserver-freepbx-14.old/root/etc/e-smith/templates/etc/odbc.ini/10freepbx 1969-12-31 19:00:00.000000000 -0500 |
144 |
+++ smeserver-freepbx-14/root/etc/e-smith/templates/etc/odbc.ini/10freepbx 2022-12-15 00:06:39.445000000 -0500 |
145 |
@@ -0,0 +1,12 @@ |
146 |
+[MySQL-{ ${freepbx}{CdrDbName} || 'asteriskcdrdb' }] |
147 |
+Description=MySQL connection to '{ ${freepbx}{CdrDbName} || 'asteriskcdrdb' }' database |
148 |
+driver=MySQL |
149 |
+server=localhost |
150 |
+database={ ${freepbx}{CdrDbName} || 'asteriskcdrdb' } |
151 |
+Port=3306 |
152 |
+Socket=/var/lib/mysql/mysql.sock |
153 |
+option=3 |
154 |
+Charset=utf8 |
155 |
+User = { ${freepbx}{DbUser} || 'freepbxuser'} |
156 |
+Password = { ${freepbx}{DbPassword} || 'freepbxuser'} |
157 |
+ |