mirror of
https://github.com/YunoHost-Apps/snserver_ynh.git
synced 2024-09-03 20:26:22 +02:00
Fix issues
This commit is contained in:
parent
daeda28946
commit
9420d6cc20
2 changed files with 7 additions and 6 deletions
|
@ -30,6 +30,7 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
|
|||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
access_domain=$(ynh_app_setting_get --app=$app --key=access_domain)
|
||||
mail=$(ynh_app_setting_get --app=$app --key=mail)
|
||||
|
||||
# Add settings here as needed by your application
|
||||
#db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
|
@ -120,13 +121,13 @@ ynh_replace_string --match_string="RAILS_RELATIVE_URL_ROOT=$old_path" --replace_
|
|||
|
||||
if [ $change_domain -eq 1 ]
|
||||
then
|
||||
mail_new="$app@$domain_new"
|
||||
ynh_replace_string --match_string="$mail" --replace_string="$mail_new" --target_file="$final_path/live/app/mailers/application_mailer.rb"
|
||||
ynh_replace_string --match_string="$domain" --replace_string="$domain_new" --target_file="$final_path/live/app/views/user_mailer/welcome.html.erb"
|
||||
new_mail="$app@$new_domain"
|
||||
ynh_replace_string --match_string="$mail" --replace_string="$new_mail" --target_file="$final_path/live/app/mailers/application_mailer.rb"
|
||||
ynh_replace_string --match_string="$domain" --replace_string="$new_domain" --target_file="$final_path/live/app/views/user_mailer/welcome.html.erb"
|
||||
fi
|
||||
if [ $change_path -eq 1 ]
|
||||
then
|
||||
ynh_replace_string --match_string="$path_url" --replace_string="$path_new" --target_file="$final_path/live/app/views/user_mailer/welcome.html.erb"
|
||||
ynh_replace_string --match_string="$path_url" --replace_string="$new_path" --target_file="$final_path/live/app/views/user_mailer/welcome.html.erb"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -129,7 +129,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|||
then
|
||||
# Backup files to keep
|
||||
tmpdir=$(mktemp -d)
|
||||
if [ -d "$final_path/live/.env" ] ; then
|
||||
if [ -f "$final_path/live/.env" ] ; then
|
||||
cp -Rp "$final_path/live/.env" "$tmpdir"
|
||||
fi
|
||||
if [ -d "$final_path/live/log" ] ; then
|
||||
|
@ -140,7 +140,7 @@ then
|
|||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
mkdir -p "$final_path"
|
||||
ynh_setup_source --dest_dir="$final_path/live"
|
||||
if [ -d "$tmpdir/.env" ] ; then
|
||||
if [ -f "$tmpdir/.env" ] ; then
|
||||
cp -Rp "$tmpdir/.env" "$final_path/live"
|
||||
fi
|
||||
if [ -d "$tmpdir/log" ] ; then
|
||||
|
|
Loading…
Reference in a new issue