#!/bin/bash

rm -rf shakti/.git
mkdir -m 770 /var/www/shakti/assets /var/www/shakti/protected/runtime /var/www/shakti/protected/files /var/www/shakti/protected/reports /var/www/shakti/customer_docs
chown -R prod:www-data /var/www/shakti/protected/runtime /var/www/shakti/assets /var/www/shakti/customer_docs /var/www/shakti/protected/files /var/www/shakti/protected/reports /var/www/shakti/protected/vendor/mpdf/mpdf/ttfontdata
cd /var/www/shakti; rm -f *esaf* *mpower* *visionindia* *jeevankiran* *varam* *valaraditi* *gtpfl* *bfl* *mahaveer* *magalir* index-test.php index-prod.php php.ini my.cnf; cd -;
cd /var/www/shakti/protected/config; rm -f *esaf* *fusion* *visionindia* *jeevankiran* *varam* *valaraditi* *gtpfl* *bfl* *mahaveer* *magalir* privileges.*; cd -;
rm -rf /var/www/shakti/shakti/data/;
cd /var/www/shakti/; # ln -s index-agrosperity.php index.php; cd -;
cd /var/www/shakti/images; ln -s agrosperity_logo.jpg client_logo.jpg; ln -s agrosperity_logo_small.jpg client_logo_small.jpg; cd -;
cd /var/www/shakti/css; ln -s default.css main.css; cd -;
cd /var/www/shakti/protected/config/; cp -p main.prod.php main.php; cp -p common.php.dist common.php; cd -;
cd /var/www/shakti/protected/config; cp -p console.php.dist console.php; #ln -s shaktimenu.prod.xml shaktimenu.xml; cd -;
echo DONE
