diff --git a/debian/resources/fusionpbx.sh b/debian/resources/fusionpbx.sh index 13212ee..10a8f18 100755 --- a/debian/resources/fusionpbx.sh +++ b/debian/resources/fusionpbx.sh @@ -38,3 +38,20 @@ chmod -R 755 /var/www/fusionpbx/secure #add the database schema #cd /var/www/fusionpbx && php /var/www/fusionpbx/core/upgrade/upgrade_schema.php > /dev/null 2>&1 + +#get the source code +git clone $BRANCH https://github.com/fusionpbx/fusionpbx.git /var/www/fusionpbx +chown -R www-data:www-data /var/www/fusionpbx +chmod -R 755 /var/www/fusionpbx/secure + +#database_password=1234 +#export PGPASSWORD=$database_password +#mkdir -p /etc/fusionpbx +#chown -R www-data:www-data /etc/fusionpbx +#cp fusionpbx/config.php /etc/fusionpbx +#sed -i /etc/fusionpbx/config.php -e s:'{database_username}:fusionpbx:' +#sed -i /etc/fusionpbx/config.php -e s:"{database_password}:$database_password:" +#domain_name=$(hostname -f) +#domain_uuid=$(/usr/bin/php /var/www/fusionpbx/resources/uuid.php); +#psql --host=127.0.0.1 --port=5432 --username=fusionpbx -c "insert into v_domains (domain_uuid, domain_name, domain_enabled) values('$domain_uuid', '$domain_name', 'true');" +#cd /var/www/fusionpbx && php /var/www/fusionpbx/core/upgrade/upgrade_domains.php