aboutsummaryrefslogtreecommitdiff
path: root/scripts/upgrade
diff options
context:
space:
mode:
authoryalh76 <yalh@yahoo.com>2020-06-04 00:36:02 +0200
committeryalh76 <yalh@yahoo.com>2020-06-04 00:36:02 +0200
commitd3df899e0a99a63ee1cf7ad845cc513aeaaf30ef (patch)
treef0ee80538ae4d3f5d51823bed49ec7169b954a06 /scripts/upgrade
parentdf0587009fbad43a6e083da2883707f421d7a36e (diff)
downloadmastodon_ynh-d3df899e0a99a63ee1cf7ad845cc513aeaaf30ef.tar.gz
mastodon_ynh-d3df899e0a99a63ee1cf7ad845cc513aeaaf30ef.tar.bz2
mastodon_ynh-d3df899e0a99a63ee1cf7ad845cc513aeaaf30ef.zip
Implement new nodejs helper
Diffstat (limited to 'scripts/upgrade')
-rw-r--r--scripts/upgrade11
1 files changed, 3 insertions, 8 deletions
diff --git a/scripts/upgrade b/scripts/upgrade
index 8441307..6445cc8 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -313,14 +313,9 @@ cp -f ../conf/cron /etc/cron.d/$app
ynh_script_progression --message="Upgrading systemd configuration..."
# Create a dedicated systemd config
-ynh_replace_string --match_string="__PORT_WEB__" --replace_string="$port_web" --target_file="../conf/mastodon-web.service"
-ynh_replace_string --match_string="__RBENVROOT__" --replace_string="$RBENV_ROOT" --target_file="../conf/mastodon-web.service"
-ynh_replace_string --match_string="__RBENVROOT__" --replace_string="$RBENV_ROOT" --target_file="../conf/mastodon-sidekiq.service"
-ynh_replace_string --match_string="__PORT_STREAM__" --replace_string="$port_stream" --target_file="../conf/mastodon-streaming.service"
-ynh_replace_string --match_string="__NODEJS_PATH__" --replace_string="$nodejs_path" --target_file="../conf/mastodon-streaming.service"
-ynh_add_systemd_config --service="$app-web" --template="mastodon-web.service"
-ynh_add_systemd_config --service="$app-sidekiq" --template="mastodon-sidekiq.service"
-ynh_add_systemd_config --service="$app-streaming" --template="mastodon-streaming.service"
+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"
#=================================================
# INTEGRATE SERVICE IN YUNOHOST