ERROR autoconfig-users.sh

Dear FOP2 Team,

I try instal fop2 from source (fop2-2.29.00-centos-x86_64.tgz) on elastix 2.5.

I if run from CLI

sh /usr/local/fop2/autoconfig-users.sh the error show like this below

[root@localhost fop2]# sh autoconfig-users.sh
autoconfig-users.sh: line 109: syntax error near unexpected token `<'
autoconfig-users.sh: line 109: `done < <( mysql -NB -u $DBUSER $DBPASS -h $DBHOST $DBNAME -e "SHOW tables FROM \`$DBNAME\` LIKE 'fop2users'"; )'


Can u help me solve this issue?

Thanks

Comments

  • Do you have a < sign in your database password?
  • No, I don't have, my password : password!!!

    Thanks
  • edited May 2015
    Well, you have an exclamation sign that most probably breaks the shell script also if its not escaped.

    I am not sure if it will work, but you can try to modify the script a little bit, find this line:
    DBPASSLINE=`cat /etc/amportal.conf | grep ^AMPDBPASS= | tail -n1`
    

    And change it to
    DBPASSLINE=`cat /etc/amportal.conf | grep ^AMPDBPASS= | tail -n1 | sed 's/!/\\!/g'`
    

    Or try changing your password to one without a special char like < > !

    If you modify autoconfig-users.sh and it works, then you will also have to modify autoconfig-buttons.sh
  • Thanks. i will try and report the result.

  • Hi Admin,

    The script is correct, no problem if i using sign !!! <> for password.

    I must run ./autoconfig-buttons.sh but if i run using command sh autoconfig-buttons.sh display error.

    Thanks
  • There is no need to prepend the shell, the script has execute permissions and calls explicitly bash on its first line. You can test the script by running

    /usr/local/fop2/autoconfig-users.sh

    And nothing else.
Sign In or Register to comment.