How to upgrade Asternic 2.x to a new version

To upgrade you need to replace all the files in the web application and sometimes the log parser.

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/src
wget download.asternic.net/asternic-stats-pro-2.2.1.tgz
tar zxvf asternic-stats-pro-2.2.1.tgz
cd asternic-stats-pro-2.2.1
mv html /var/www/html/stats_new
 

The 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_new
cp /var/www/html/stats/config.php /var/www/html/stats_new
 

Finally 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_new
 

Now 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_old
mv /var/www/html/stats_new /var/www/html/stats
 

Finally, you could actually remove the previous version directory:

rm -rf /var/www/html/stats_old

Log Parser 

Change back to the directory where you extracted the newer Asternic .tar.gz file:

cd /usr/src/asternic-stats-pro-2.2.1

Now 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.bak

Then proceed with installing the newer parsers by using this command:

make parselog

You might also want to upgrade init scripts:


make initscripts

Did you find this article useful?