Change asteriskuser password in 2.9

I’m trying to change the asteriskuser password using a small shell script. So far, I’ve got it properly updating /etc/freepbx.conf, and in mysql itself.

However, upon trying to run apply_conf.sh, it seems to fail, and because of this amportal fails as well. Resetting back to default seems to work fine, but this leads me to beleive that the password is held up somewhere else.

Execution of apply_conf.sh and amportal restart gives the following:

/usr/src/freepbx/apply_conf.sh: line 51: [FATAL]: command not found
Updating configuration...
/cdr_mysql.conf
sed: can't read /cdr_mysql.conf: No such file or directory
sed: can't read /cdr_mysql.conf: No such file or directory
sed: can't read /cdr_mysql.conf: No such file or directory
/manager.conf
sed: can't read /manager.conf: No such file or directory
sed: can't read /manager.conf: No such file or directory
/vm_email.inc
You might need to modify /etc/asterisk/vm_email.inc manually
Done

Please wait...
/usr/local/sbin/amportal: line 46: [FATAL]: command not found

/var/lib/asterisk/bin/freepbx_engine: line 98: [FATAL]: command not found
**** WARNING: ERROR IN CONFIGURATION ****
astrundir in '/etc/asterisk' is set to  but the directory
does not exists. Attempting to create it with: 'mkdir -p '

mkdir: missing operand
Try `mkdir --help' for more information.
**** ERROR: COULD NOT CREATE  ****
Attempt to execute 'mkdir -p ' failed with an exit code of 1
You must create this directory and the try again.

Line 51 in apply_conf.php is a call to gen_amp_conf.php, which seems to read the values from /etc/freepbx.conf and then use those to update cdr_mysql.conf, etc.

TIA,
Carlos

Did you find a solution?