Saturday, January 18, 2014

freepbx moving all .conf.old files back to original

Hi, all

Once by mistake I recompiled all .conf files from asterisk source, and some freepbx files were moved into <FILE>.conf.old. So this is the script to change it back :
mv <FILE>.conf to <FILE>.conf_orig
mv <FILE>.conf.old mv <FILE>.conf
just go to /etc/asterisk
and run:

for i in `ls | grep "\.old$"`;do echo "${i%.old} will be saved as ${i%.old}_orig"; mv ${i%.old} ${i%.old}_orig; echo " moving $i to ${i%.old}" ; mv $i ${i%.old};done

No comments:

Post a Comment