#!/bin/bash
version=$(/usr/bin/xmllint --xpath 'string(/module/version)' /opt/freepbx/admin/modules/core/module.xml|cut -d. -f1)
php="74"
if [[ $version -ge 17 ]]
then
  php="82"
fi
forcephp=$(/sbin/e-smith/db configuration getprop freepbx PHPVersion 2>/dev/null || echo $php )
php=$forcephp

/usr/bin/php$php  --define sys_temp_dir=/var/spool/asterisk/tmp/ --define allow_url_fopen=1  /var/lib/asterisk/bin/fwconsole $@ 
