32
1
mirror of https://github.com/joomla-extensions/weblinks.git synced 2024-11-16 01:27:07 +00:00
weblinks/tests/travis-php-fpm.sh
Tito Alvarez fc32eea69e Improved Travis system tests including multiple PHP versions and PHP 7 support
* Added PHP 7 support
* Improved test system including multiple PHP versions
* Removed unused php extensions
* Improved Travis script readability
2016-07-31 09:33:59 +02:00

20 lines
1017 B
Bash

#!/bin/bash
owner="$1"
phpversionname="$2"
file="/home/$owner/.phpenv/versions/$phpversionname/etc/php-fpm.conf"
cp /home/$owner/.phpenv/versions/$phpversionname/etc/php-fpm.conf.default /home/$owner/.phpenv/versions/$phpversionname/etc/php-fpm.conf
if [ -f /home/$owner/.phpenv/versions/$phpversionname/etc/php-fpm.d/www.conf.default ]; then
cp /home/$owner/.phpenv/versions/$phpversionname/etc/php-fpm.d/www.conf.default /home/$owner/.phpenv/versions/$phpversionname/etc/php-fpm.d/www.conf
file=/home/$owner/.phpenv/versions/$phpversionname/etc/php-fpm.d/www.conf
fi;
sed -e "s,listen = 127.0.0.1:9000,listen = /tmp/php${phpversionname:0:1}-fpm.sock,g" --in-place $file
sed -e "s,;listen.owner = nobody,listen.owner = $owner,g" --in-place $file
sed -e "s,;listen.group = nobody,listen.group = $owner,g" --in-place $file
sed -e "s,;listen.mode = 0660,listen.mode = 0666,g" --in-place $file
sed -e "s,user = nobody,;user = $owner,g" --in-place $file
sed -e "s,group = nobody,;group = $owner,g" --in-place $file