ERROR ... line 17: [: too many arguments

Hello,
I tried to install demo of the fop2 (2.27-centos-i386, Asterisk 11.6.0, FreePBX 2.11.0.14). After installation, configuring of /usr/local/fop2/fop2.cfg , /etc/asterisk/manager.conf and execute of
#> /usr/local/fop2/fop2_server --test

I received following error message:
# /usr/local/fop2/fop2_server --test
Flash Operator Panel 2 - License file fop2.lic not found.
Running in Demo Mode
/usr/local/fop2/autoconfig-buttons-freepbx.sh: line 17: [: too many arguments
Connection to manager OK!

I'm not able to connect to fop2-panel at http://mydomain/fop2 and the "FOP2"-line did not appear in the FreePBX menu "Reports".

What may be a reason of this error?

Thanks in advance for your support.

Comments

  • The reason for the error is that the autoconfig script included in fop2 tries to determine the FreePBX version number, and the latest FreePBX version includes a duplicate line in their xml info page. The error is a problem , but it does not prevent fop2 from working. You can fix it by changing line 15 of /usr/local/fop2/autoconfig-buttons-freepbx.sh from this:
    AMPVERSION=`cat $AMPDIR | grep "<version>" | sed -e 's/<[^>]*>//g' | cut -d\. -f 1,2 | sed 's/\s//g' | sed 's/\.//g'`
    
    to this:
    AMPVERSION=`cat $AMPDIR | grep "<version>" | head -n 1 | sed -e 's/<[^>]*>//g' | cut -d\. -f 1,2 | sed 's/\s//g' | sed 's/\.//g'`
    

    If you want to see a FOP2 menu in freePBX, you also need to install the fop2admin manager module, you can download version 1.2.15 from http://www.fop2.com/download.php, here you have instructions to install it (just upload it via module admin):

    http://www.fop2.com/documentation-insta ... module.php

    And finally, be sure fop2 is started. In the server, run this to start it:
    service fop2 start
    

    wait a while and then check that is running with the following command (that must return a number):
    pgrep fop2
    

    If it returns a number, then fop2 is running so you might want to try to log in with your browser.

    Best regards,
  • Thank you very much! I'll try it right now. :)
  • FOP2 installed and everything is OK. Thanks again!
Sign In or Register to comment.