merge upstream

This commit is contained in:
2026-08-10 10:57:17 +00:00
14 changed files with 159 additions and 74 deletions

View File

@@ -16,7 +16,7 @@ database_name=fusionpbx # Database name (safe characters A-Z, a-z, 0-9)
database_username=fusionpbx # Database username (safe characters A-Z, a-z, 0-9)
database_password=random # random or a custom value (safe characters A-Z, a-z, 0-9)
database_enabled=true # true or false
database_version=15 # Postgres 16, 15, 14, 13, 12
database_version=18 # Postgres 18, 17, 16, 15, 14, 13, 12
database_host=127.0.0.1 # hostname or IP address
database_port=5432 # port number
database_backup=false # true or false
@@ -26,7 +26,7 @@ firewall_enabled=true # true or false
# General Settings
interface_name=auto # auto, em0, igb0, vtnet0, or other valid names
php_version=8.1 # PHP version 8.1, 7.4
php_version=8.2 # PHP version 8.3, 8.2, 8.1, 7.4
portsnap_enabled=false # true or false
sngrep_enabled=true # true or false
fail2ban_enabled=false # true or false

View File

@@ -68,7 +68,7 @@ if [ .$nginx_enabled = .'true' ]; then
#update application defaults
if [ .$nginx_enabled = .'true' ]; then
cd /usr/local/www/fusionpbx && /usr/bin/php /var/www/fusionpbx/core/upgrade/upgrade.php --defaults
cd /usr/local/www/fusionpbx && /usr/local/bin/php /usr/local/www/fusionpbx/core/upgrade/upgrade.php --defaults
fi
#add the user
@@ -97,11 +97,11 @@ if [ .$nginx_enabled = .'true' ]; then
#update application defaults
if [ .$nginx_enabled = .'true' ]; then
cd /usr/local/www/fusionpbx && /usr/bin/php /var/www/fusionpbx/core/upgrade/upgrade.php --defaults
cd /usr/local/www/fusionpbx && /usr/local/bin/php /usr/local/www/fusionpbx/core/upgrade/upgrade.php --defaults
fi
#update permissions
#cd /var/www/fusionpbx && /usr/bin/php /var/www/fusionpbx/core/upgrade/upgrade.php --permissions
#cd /usr/local/www/fusionpbx && /usr/local/bin/php /usr/local/www/fusionpbx/core/upgrade/upgrade.php --permissions
#reset the current working directory
cd $cwd

View File

@@ -29,3 +29,5 @@ chown -R www:www /var/cache/fusionpbx
#get the source code
git clone $branch https://git.nsinnovations.net/nsinnovations/fusionpbx.gitusr/local/www/fusionpbx
chown -R www:www /usr/local/www/fusionpbx
cd /usr/local/www/fusionpbx
git config --global --add safe.directory /usr/local/www/fusionpbx

View File

@@ -14,27 +14,52 @@ echo "DEFAULT_VERSIONS+=ssl=openssl" >> /etc/make.conf
#install dependencies
if [ ."$php_version" = ."7.3" ]; then
pkg install --yes php73 php73-phar php73-pdo php73-pdo_odbc php73-pdo_sqlite php73-json php73-gd php73-imap
pkg install --yes php73-ldap php73-openssl php73-sockets php73-simplexml php73-xml php73-session php73-iconv
pkg install --yes php73-zlib php73-filter php73-pdo_pgsql php73-pgsql php73-curl php73-mbstring
pkg install --yes php73-posix php73-ldap php73-openssl php73-sockets php73-simplexml php73-xml php73-session php73-iconv
pkg install --yes php73-pcntl php73-zlib php73-filter php73-pdo_pgsql php73-pgsql php73-curl php73-mbstring
fi
if [ ."$php_version" = ."7.4" ]; then
pkg install --yes php74 php74-phar php74-pdo php74-pdo_odbc php74-pdo_sqlite php74-json php74-gd php74-imap
pkg install --yes php74-ldap php74-openssl php74-sockets php74-simplexml php74-xml php74-session php74-iconv
pkg install --yes php74-zlib php74-filter php74-pdo_pgsql php74-pgsql php74-curl php74-mbstring
pkg install --yes php74-posix php74-pcntl php74-zlib php74-filter php74-pdo_pgsql php74-pgsql php74-curl php74-mbstring
pkg install --yes php74-pdo_pgsql php74-pgsql
fi
if [ ."$php_version" = ."8.0" ]; then
pkg install --yes php80 php80-phar php80-pdo php80-pdo_odbc php80-pdo_sqlite php80-gd php80-imap
pkg install --yes php80-ldap php80-sockets php80-simplexml php80-xml php80-session php80-iconv
pkg install --yes php80-zlib php80-filter php80-curl php80-mbstring
pkg install --yes php80-posix php80-pcntl php80-zlib php80-filter php80-curl php80-mbstring
pkg install --yes php80-pdo_pgsql php80-pgsql
fi
if [ ."$php_version" = ."8.1" ]; then
pkg install --yes php81 php81-phar php81-pdo php81-pdo_odbc php81-pdo_sqlite php81-gd php81-imap
pkg install --yes php81-ldap php81-sockets php81-simplexml php81-xml php81-session php81-iconv
pkg install --yes php81-zlib php81-filter php81-curl php81-mbstring
pkg install --yes php81-posix php81-pcntl php81-zlib php81-filter php81-curl php81-mbstring
pkg install --yes php81-pdo_pgsql php81-pgsql
fi
if [ ."$php_version" = ."8.2" ]; then
pkg install --yes php82 php82-phar php82-pdo php82-pdo_odbc php82-pdo_sqlite php82-gd php82-imap
pkg install --yes php82-ldap php82-sockets php82-simplexml php82-xml php82-session php82-iconv
pkg install --yes php82-posix php82-pcntl php82-zlib php82-filter php82-curl php82-mbstring
pkg install --yes php82-pdo_pgsql php82-pgsql
fi
if [ ."$php_version" = ."8.3" ]; then
pkg install --yes php83 php83-phar php83-pdo php83-pdo_odbc php83-pdo_sqlite php83-gd php83-imap
pkg install --yes php83-ldap php83-sockets php83-simplexml php83-xml php83-session php83-iconv
pkg install --yes php83-posix php83-pcntl php83-zlib php83-filter php83-curl php83-mbstring
pkg install --yes php83-pdo_pgsql php83-pgsql
fi
if [ ."$php_version" = ."8.4" ]; then
pkg install --yes php84 php84-phar php84-pdo php84-pdo_odbc php84-pdo_sqlite php84-gd
pkg install --yes php84-ldap php84-sockets php84-simplexml php84-xml php84-session php84-iconv
pkg install --yes php84-posix php84-pcntl php84-zlib php84-filter php84-curl php84-mbstring
pkg install --yes php84-pdo_pgsql php84-pgsql
pkg install --yes php84-imap
fi
if [ ."$php_version" = ."8.5" ]; then
pkg install --yes php85 php85-phar php85-pdo php85-pdo_odbc php85-pdo_sqlite php85-gd php85-imap
pkg install --yes php85-ldap php85-sockets php85-simplexml php85-xml php85-session php85-iconv
pkg install --yes php85-posix php85-pcntl php85-zlib php85-filter php85-curl php85-mbstring
pkg install --yes php85-pdo_pgsql php85-pgsql
fi
#send a message
verbose "Configuring PHP"

View File

@@ -24,6 +24,14 @@ password=$(cat /dev/random | env LC_CTYPE=C tr -dc a-zA-Z0-9 | head -c 20)
echo "Install PostgreSQL and create the database and users\n"
#postgres install
if [ ."$database_version" = ."18" ]; then
pkg install --yes postgresql18-server
#cd /usr/ports/databases/postgresql18-server/ && make install clean BATCH=yes
fi
if [ ."$database_version" = ."17" ]; then
pkg install --yes postgresql17-server
#cd /usr/ports/databases/postgresql17-server/ && make install clean BATCH=yes
fi
if [ ."$database_version" = ."16" ]; then
echo "IGNORE_DEPENDS=postgresql15-client" >> /usr/local/etc/pkg.conf
pkg install --yes postgresql16-server
@@ -53,6 +61,12 @@ echo 'postgresql_enable=true' >> /etc/rc.conf
/usr/local/etc/rc.d/postgresql initdb
#start postgresql
if [ ."$database_version" = ."18" ]; then
sudo -u postgres /usr/local/bin/pg_ctl -D /var/db/postgres/data18 start
fi
if [ ."$database_version" = ."17" ]; then
sudo -u postgres /usr/local/bin/pg_ctl -D /var/db/postgres/data17 start
fi
if [ ."$database_version" = ."16" ]; then
sudo -u postgres /usr/local/bin/pg_ctl -D /var/db/postgres/data16 start
fi