freePBX 2.8.1.3
I updated FreePBX to run it unembedded from elastix. I am now having a problem with FOP2
[root@elastix fop2]# /usr/local/fop2/fop2_server --test
Flash Operator Panel 2 - Invalid license for this install (i). Demo Mode
/usr/local/fop2/autoconfig-buttons-freepbx.sh: line 15: [: too many arguments
Connection to manager OK!
[root@elastix fop2]#
looking into /usr/local/fop2/autoconfig-buttons-freepbx.sh I am finding that "-bash" is getting passed to a variable and resulting in an "if" statement betting 2 arguments.
Can anyone tell me why this is getting introduced?
[root@elastix fop2]# AMPDIR=``
[root@elastix fop2]# $AMPDIR
[root@elastix fop2]# AMPDIR=`cat /etc/amportal.conf | sed 's/ //g' | grep ^AMPWEBROOT | cut -d= -f2 | tail -n1`
[root@elastix fop2]# AMPDIR=$AMPDIR/admin/modules/framework/module.xml
[root@elastix fop2]#
[root@elastix fop2]# AMPVERSION=`cat $AMPDIR | grep version | sed -e 's/<[^>]*>//g' | cut -b 2,4`
[root@elastix fop2]#
[root@elastix fop2]# $AMPVERSION
-bash: 28: command not found
[root@elastix fop2]# $AMPDIR
-bash: /var/www/html/admin/modules/framework/module.xml: Permission denied
[root@elastix fop2]# AMPDIR=`cat /etc/amportal.conf | sed 's/ //g' | grep ^AMPWEBROOT | cut -d= -f2 | tail -n1`
[root@elastix fop2]# $AMPDIR
-bash: /var/www/html: is a directory
THANKS in advance,
Jason
[root@elastix fop2]# /usr/local/fop2/fop2_server --test
Flash Operator Panel 2 - Invalid license for this install (i). Demo Mode
/usr/local/fop2/autoconfig-buttons-freepbx.sh: line 15: [: too many arguments
Connection to manager OK!
[root@elastix fop2]#
looking into /usr/local/fop2/autoconfig-buttons-freepbx.sh I am finding that "-bash" is getting passed to a variable and resulting in an "if" statement betting 2 arguments.
Can anyone tell me why this is getting introduced?
[root@elastix fop2]# AMPDIR=``
[root@elastix fop2]# $AMPDIR
[root@elastix fop2]# AMPDIR=`cat /etc/amportal.conf | sed 's/ //g' | grep ^AMPWEBROOT | cut -d= -f2 | tail -n1`
[root@elastix fop2]# AMPDIR=$AMPDIR/admin/modules/framework/module.xml
[root@elastix fop2]#
[root@elastix fop2]# AMPVERSION=`cat $AMPDIR | grep version | sed -e 's/<[^>]*>//g' | cut -b 2,4`
[root@elastix fop2]#
[root@elastix fop2]# $AMPVERSION
-bash: 28: command not found
[root@elastix fop2]# $AMPDIR
-bash: /var/www/html/admin/modules/framework/module.xml: Permission denied
[root@elastix fop2]# AMPDIR=`cat /etc/amportal.conf | sed 's/ //g' | grep ^AMPWEBROOT | cut -d= -f2 | tail -n1`
[root@elastix fop2]# $AMPDIR
-bash: /var/www/html: is a directory
THANKS in advance,
Jason
Comments
The error is non fatal, but anyways it would be nice to fix it (what the script does is try to determine the freepbx version you have in order to select 'from-internal' or 'from-queue' as the queue context for your buttons. If that fails it will default to from-internal, but this assumption and warning will not prevent fop2 from working.
So, you have to see what is the content from AMPWEBROOT in /etc/amportal.conf and then see if you have the file:
AMPWEBROOT/admin/modules/framework/module.xml
and in that file some line that says the version.
But as I said, this error is non fatal, fop2 wll work anyways. If fop2 does not work, then look for the problem somewhere else (you did not tell us what is your problem, except for this error printed on screen if you do the --test).
Best regards,
AMPVERSION=`cat $AMPDIR | grep "<version>" | sed -e 's/<[^>]*>//g' | cut -b 2,4`