diff --git a/scripts/install b/scripts/install index 6e98750..bb3c16a 100644 --- a/scripts/install +++ b/scripts/install @@ -72,9 +72,6 @@ sed -i "s@YNH_PMA_PASSWORD@$db_pwd@g" ../conf/config.inc.php sed -i "s@YNH_MYSQL_ROOT_PASSWORD@$(sudo cat /etc/yunohost/mysql)@g" ../conf/config.inc.php sudo cp ../conf/config.inc.php $final_path -#sudo yunohost app addaccess phpmyadmin -u $admin -#sudo yunohost app setting phpmyadmin admin -v $admin - # Files owned by root, www-data can just read echo "Setting permission..." sudo chown -R root: $final_path @@ -101,6 +98,9 @@ sudo cp ../conf/php-fpm.conf $phpfpmconf sudo chown root: $phpfpmconf sudo chmod 644 $phpfpmconf +# We grant access to admin only +sudo yunohost app addaccess --users=$admin $app + sudo service php5-fpm reload sudo service nginx reload sudo yunohost app ssowatconf diff --git a/scripts/restore b/scripts/restore index 7933f34..231192f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -40,6 +40,9 @@ mysql --debug-check -u $db_user -p$db_pwd $db_user < ${backup_dir}/db.sql # Copy dedicated php-fpm process from backup folder to the right location sudo cp -a $backup_dir/php-fpm.conf /etc/php5/fpm/pool.d/$app.conf +# We grant access to admin only +sudo yunohost app addaccess --users=$admin $app + # And Reload services sudo service php5-fpm reload sudo service nginx reload diff --git a/scripts/upgrade b/scripts/upgrade index 1980359..3552c27 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -39,9 +39,6 @@ sed -i "s@YNH_PMA_PASSWORD@$db_pwd@g" ../conf/config.inc.php sed -i "s@YNH_MYSQL_ROOT_PASSWORD@$(sudo cat /etc/yunohost/mysql)@g" ../conf/config.inc.php sudo cp ../conf/config.inc.php $final_path -#sudo yunohost app addaccess phpmyadmin -u $admin -#sudo yunohost app setting phpmyadmin admin -v $admin - # Files owned by root, www-data can just read echo "Setting permission..." sudo chown -R root: $final_path @@ -68,6 +65,9 @@ sudo cp ../conf/php-fpm.conf $phpfpmconf sudo chown root: $phpfpmconf sudo chmod 644 $phpfpmconf +# We grant access to admin only +sudo yunohost app addaccess --users=$admin $app + sudo service php5-fpm reload sudo service nginx reload sudo yunohost app ssowatconf