aboutsummaryrefslogtreecommitdiff
path: root/scripts/restore
diff options
context:
space:
mode:
authoryalh76 <yalh@yahoo.com>2021-02-17 19:22:07 +0100
committeryalh76 <yalh@yahoo.com>2021-02-17 19:22:07 +0100
commitaa8928abd9d670920a23e922ab6d188ba530ffb1 (patch)
tree6a60945f540789b6739519d704c880a321970ed5 /scripts/restore
parent014dcf6239936a43249f3f8dd1fe8c5237f335d7 (diff)
downloadmastodon_ynh-aa8928abd9d670920a23e922ab6d188ba530ffb1.tar.gz
mastodon_ynh-aa8928abd9d670920a23e922ab6d188ba530ffb1.tar.bz2
mastodon_ynh-aa8928abd9d670920a23e922ab6d188ba530ffb1.zip
Apply last example_ynh
Diffstat (limited to 'scripts/restore')
-rw-r--r--scripts/restore7
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/restore b/scripts/restore
index 84610eb..aef19ad 100644
--- a/scripts/restore
+++ b/scripts/restore
@@ -15,7 +15,6 @@ source /usr/share/yunohost/helpers
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
-ynh_script_progression --message="Managing script failure..."
ynh_clean_setup () {
ynh_clean_check_starting
@@ -34,7 +33,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
-db_user=$app
+db_user=$db_name
db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
#=================================================
@@ -135,7 +134,7 @@ ynh_script_progression --message="Restoring the systemd configuration..."
ynh_restore_file --origin_path="/etc/systemd/system/$app-web.service"
ynh_restore_file --origin_path="/etc/systemd/system/$app-sidekiq.service"
ynh_restore_file --origin_path="/etc/systemd/system/$app-streaming.service"
-systemctl enable "$app-web" "$app-sidekiq" "$app-streaming"
+systemctl enable "$app-web" "$app-sidekiq" "$app-streaming" --quiet
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
@@ -167,7 +166,7 @@ ynh_restore_file --origin_path="/etc/cron.d/$app"
#=================================================
# RELOAD NGINX
#=================================================
-ynh_script_progression --message="Reloading nginx web server..."
+ynh_script_progression --message="Reloading NGINX web server..."
ynh_systemd_action --service_name=nginx --action=reload