How to upgrade Asternic 2.x to a new version
Web Files
Just to be cautious, we suggest to install the new html directory over a new location in your web server, so you can test it out before replacing anything, as you might find out that your license is older than a year and won't run on the new version. If that is the case, no harm is done on your original install.
Use these commands to download version 2.2.1, if there is a newer version just specify the correct filename:
cd /usr/srcwget download.asternic.net/asternic-stats-pro-2.2.1.tgztar zxvf asternic-stats-pro-2.2.1.tgzcd asternic-stats-pro-2.2.1mv html /var/www/html/stats_newThe basic file copying is done, now you will have to copy the configuration and license files from the original directory over this new directory:
cp /var/www/html/stats/asterniclic.php /var/www/html/stats_newcp /var/www/html/stats/config.php /var/www/html/stats_newFinally you will have to change ownership of all the files and directory to the same user the web server is running as. In FreePBX based distros, that user/group is 'asterisk':
chown asterisk.asterisk -R /var/www/html/stats_newNow point your browser to http://your.server/stats_new and verify if all is working fine. If it is and you are satisfied with the result, you can swap directories:
mv /var/www/html/stats /var/www/html/stats_oldmv /var/www/html/stats_new /var/www/html/statsFinally, you could actually remove the previous version directory:
rm -rf /var/www/html/stats_oldLog Parser
Change back to the directory where you extracted the newer Asternic .tar.gz file:
cd /usr/src/asternic-stats-pro-2.2.1Now you can just overwrite the whole parser directory. Be careful here, if you did modify anything inside /usr/local/parselog, those modifications will be lost, particulary possible changes to the post recording script update_mix_mixmonitor.pl. So again, just to be safe, backup that script:
cp /usr/local/parselog/update_mix_mixmonitor.pl /usr/local/parselog_update_mix_mixmonitor.pl.bakThen proceed with installing the newer parsers by using this command:
make parselogYou might also want to upgrade init scripts:
make initscripts