Hi.
I have made a bash script that gets the users permissions from another file, the bash script works fine and the fop2.cfg file can execute it. However, the output configurations from my bash file aren't being applied to the configuration.
Below is my bash script which prints out the new user permissions in the correct syntax
#!/bin/bash for USER in `cat /etc/asterisk/voicemail.conf | grep "=>" | cut -d, -f1 | sed 's/ => /:/g'` do echo "$USER" > tmpUserFile USEREXT=`cat ./tmpUserFile | cut -d, -f1 | sed 's/ => /:/g' | cut -d: -f1` for CHKUSER in `cat ./manual-user-rights.cfg | cut -d: -f1`; do if [ "$USEREXT" == "$CHKUSER" ] then USERRIGHTS=`cat ./manual-user-rights.cfg | grep "$USEREXT" | cut -d: -f2`; echo "user=$USER:$USERRIGHTS"; fi done rm -r ./tmpUserFile done echo "buttonfile=autobuttons.cfg"
Perhaps some line issue with the echo? not recognizing the line break?
Also can anybody tell me when the fop2.cfg is executed. Eg. is the configuration re-run when users log in, or does the fop2.cfg only re-run when the service is restarted?
Cheers.