User permission

This commit is contained in:
Michael RICOIS 2016-12-05 14:43:40 +01:00
parent 023b778150
commit 41f73d2428

View File

@ -1,12 +1,13 @@
#!/usr/bin/env bash
echo 'ubuntu:scores' | sudo chpasswd
VARGANTDEV=1
DIR=/vagrant
DIRDATA=$DIR/data
MYSQL_PASS=scores
MARIADB_VERSION="10.1"
PHPMYADMIN_VERSION="4.6.3"
USER=$(whoami)
# --- Add a file action.upgrade to perfom a system upgrade
if [ -f $DIR/action.upgrade ]; then
@ -86,8 +87,10 @@ if [ ! -f /usr/bin/php ]; then
sudo sed -i -e 's/;opcache.enable=0/opcache.enable=1/g' /etc/php/7.0/fpm/php.ini
sudo cp -f $DIRDATA/PHP/xdebug.ini /etc/php/7.0/mods-available/xdebug.ini
# Pool user
sudo sed -i -e "s/user = www-data/user = $USER/g" /etc/php/7.0/fpm/pool.d/www.conf
sudo sed -i -e 's/group = www-data/group = "$(whoami)"/g' /etc/php/7.0/fpm/pool.d/www.conf
sudo sed -i -e 's/listen.owner = www-data/listen.owner = ubuntu/g' /etc/php/7.0/fpm/pool.d/www.conf
sudo sed -i -e 's/listen.group = www-data/listen.group = ubuntu/g' /etc/php/7.0/fpm/pool.d/www.conf
sudo sed -i -e 's/user = www-data/user = ubuntu/g' /etc/php/7.0/fpm/pool.d/www.conf
sudo sed -i -e 's/group = www-data/group = ubuntu/g' /etc/php/7.0/fpm/pool.d/www.conf
# --- Browscap
sudo cp -f $DIRDATA/PHP/php_browscap.ini /etc/php/7.0/fpm/
sudo sed -i -e 's/;browscap = extra\/browscap.ini/browscap = \/etc\/php\/7.0\/fpm\/php_browscap.ini/g' /etc/php/7.0/fpm/php.ini