mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
[enh] Pass user/group to php-fpm.conf and remove old dir at upgrade
This commit is contained in:
parent
ae751145b2
commit
2994c1e80c
3 changed files with 8 additions and 5 deletions
|
@ -8,8 +8,8 @@ listen.group = www-data
|
|||
listen.mode = 0600
|
||||
|
||||
; Unix user/group of processes.
|
||||
user = #POOLNAME#
|
||||
group = #POOLNAME#
|
||||
user = #USER#
|
||||
group = #GROUP#
|
||||
|
||||
; Choose how the process manager will control the number of child processes.
|
||||
pm = dynamic
|
||||
|
|
|
@ -78,6 +78,8 @@ sudo cp ../conf/nginx.conf "$nginx_conf"
|
|||
|
||||
# Copy and set php-fpm configuration
|
||||
phpfpm_conf="/etc/php5/fpm/pool.d/${app}.conf"
|
||||
sed -i "s@#USER#@${app}@g" ../conf/php-fpm.conf
|
||||
sed -i "s@#GROUP#@${app}@g" ../conf/php-fpm.conf
|
||||
sed -i "s@#POOLNAME#@${app}@g" ../conf/php-fpm.conf
|
||||
sed -i "s@#DESTDIR#@${DESTDIR}/@g" ../conf/php-fpm.conf
|
||||
sudo cp ../conf/php-fpm.conf "$phpfpm_conf"
|
||||
|
|
|
@ -46,6 +46,8 @@ sudo cp ../conf/nginx.conf "$nginx_conf"
|
|||
|
||||
# Copy and set php-fpm configuration
|
||||
phpfpm_conf="/etc/php5/fpm/pool.d/${app}.conf"
|
||||
sed -i "s@#USER#@${app}@g" ../conf/php-fpm.conf
|
||||
sed -i "s@#GROUP#@${app}@g" ../conf/php-fpm.conf
|
||||
sed -i "s@#POOLNAME#@${app}@g" ../conf/php-fpm.conf
|
||||
sed -i "s@#DESTDIR#@${DESTDIR}/@g" ../conf/php-fpm.conf
|
||||
sudo cp ../conf/php-fpm.conf "$phpfpm_conf"
|
||||
|
@ -83,9 +85,8 @@ for a in $(sudo ls "${DESTDIR}/apps"); do
|
|||
&& sudo cp -a "${DESTDIR}/apps/$a" "${TMPDIR}/apps/$a"
|
||||
done
|
||||
|
||||
# Rename current directory and move new one
|
||||
sudo rm -rf "${DESTDIR}-old"
|
||||
sudo mv "$DESTDIR" "${DESTDIR}-old"
|
||||
# Rename existing app directory and move new one
|
||||
sudo rm -rf "${DESTDIR}"
|
||||
sudo mv "$TMPDIR" "$DESTDIR"
|
||||
|
||||
# Set app folders ownership
|
||||
|
|
Loading…
Add table
Reference in a new issue