diff options
| author | yalh76 <yalh@yahoo.com> | 2021-04-10 20:28:06 +0200 |
|---|---|---|
| committer | yalh76 <yalh@yahoo.com> | 2021-04-10 20:28:06 +0200 |
| commit | f19e49ae9861a93b22640f11437b749a006be2cd (patch) | |
| tree | d7a803a006d8caaedb381bc00f44bad8803aedef /scripts/upgrade | |
| parent | d5c6970fafd35955d1f6ea695d8e195c64419620 (diff) | |
| download | mastodon_ynh-f19e49ae9861a93b22640f11437b749a006be2cd.tar.gz mastodon_ynh-f19e49ae9861a93b22640f11437b749a006be2cd.tar.bz2 mastodon_ynh-f19e49ae9861a93b22640f11437b749a006be2cd.zip | |
Apply example_ynh
Diffstat (limited to 'scripts/upgrade')
| -rw-r--r-- | scripts/upgrade | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/scripts/upgrade b/scripts/upgrade index b4c16e1..870bd4c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -230,14 +230,27 @@ pushd "$final_path/live" popd #================================================= -# MODIFY A CONFIG FILE +# UPDATE A CONFIG FILE #================================================= -ynh_script_progression --message="Modifying a config file..." +ynh_script_progression --message="Updating a config file..." language="$(echo $language | head -c 2)" ynh_add_config --template="../conf/.env.production.sample" --destination="$config" +chmod 400 "$config" +chown $app:$app "$config" + +#================================================= +# SETUP SYSTEMD +#================================================= +ynh_script_progression --message="Upgrading systemd configuration..." + +# Create a dedicated systemd config +ynh_add_systemd_config --service="$app-web" --template="mastodon-web.service" --others_var="port_web RBENV_ROOT" +ynh_add_systemd_config --service="$app-sidekiq" --template="mastodon-sidekiq.service" --others_var="RBENV_ROOT" +ynh_add_systemd_config --service="$app-streaming" --template="mastodon-streaming.service" --others_var="port_stream ynh_node_load_PATH ynh_node" + #================================================= # UPGRADE MASTODON #================================================= @@ -265,16 +278,6 @@ ynh_script_progression --message="Setuping the cron file..." ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" #================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Upgrading systemd configuration..." - -# Create a dedicated systemd config -ynh_add_systemd_config --service="$app-web" --template="mastodon-web.service" --others_var="port_web RBENV_ROOT" -ynh_add_systemd_config --service="$app-sidekiq" --template="mastodon-sidekiq.service" --others_var="RBENV_ROOT" -ynh_add_systemd_config --service="$app-streaming" --template="mastodon-streaming.service" --others_var="port_stream ynh_node_load_PATH ynh_node" - -#================================================= # GENERIC FINALIZATION #================================================= # INTEGRATE SERVICE IN YUNOHOST |
