mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #1001 from YunoHost/fix_add_fpm_restore
Fix ynh_add_fpm_config with template in restore
This commit is contained in:
commit
b52f5bc182
1 changed files with 8 additions and 2 deletions
|
@ -148,8 +148,14 @@ ynh_add_fpm_config () {
|
||||||
|
|
||||||
if [ $use_template -eq 1 ]
|
if [ $use_template -eq 1 ]
|
||||||
then
|
then
|
||||||
# Usage 1, use the template in ../conf/php-fpm.conf
|
# Usage 1, use the template in conf/php-fpm.conf
|
||||||
cp ../conf/php-fpm.conf "$finalphpconf"
|
local phpfpm_path="../conf/php-fpm.conf"
|
||||||
|
if [ ! -e "$phpfpm_path" ]; then
|
||||||
|
phpfpm_path="../settings/conf/php-fpm.conf" # Into the restore script, the php-fpm template is not at the same place
|
||||||
|
fi
|
||||||
|
# Make sure now that the template indeed exists
|
||||||
|
[ -e "$phpfpm_path" ] || ynh_die --message="Unable to find template to configure php-fpm."
|
||||||
|
cp "$phpfpm_path" "$finalphpconf"
|
||||||
ynh_replace_string --match_string="__NAMETOCHANGE__" --replace_string="$app" --target_file="$finalphpconf"
|
ynh_replace_string --match_string="__NAMETOCHANGE__" --replace_string="$app" --target_file="$finalphpconf"
|
||||||
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$finalphpconf"
|
ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="$finalphpconf"
|
||||||
ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="$finalphpconf"
|
ynh_replace_string --match_string="__USER__" --replace_string="$app" --target_file="$finalphpconf"
|
||||||
|
|
Loading…
Add table
Reference in a new issue