From 8532b3274ddb44f53ad54069fbba2ee041933d60 Mon Sep 17 00:00:00 2001 From: Fabian Wilkens Date: Sat, 1 May 2021 22:47:12 +0200 Subject: [PATCH] Fix systemd - Ruby path --- conf/systemd.service | 2 +- scripts/install | 2 +- scripts/upgrade | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 58e06c1..7334e8e 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -11,7 +11,7 @@ Group=__APP__ WorkingDirectory=__FINALPATH__/live Environment=RAILS_ENV=production Environment="PORT=__PORT__" -ExecStart=/opt/rbenv/versions/__RUBY_VERSION__/bin/bundle exec rails server +ExecStart=__RBENV_ROOT__/versions/__APP__/bin/bundle exec rails server ExecReload=/bin/kill -SIGUSR1 $MAINPID StandardOutput=append:/var/log/__APP__/__APP__.log StandardError=append:/var/log/__APP__/__APP__.log diff --git a/scripts/install b/scripts/install index 9fccd43..80dc886 100755 --- a/scripts/install +++ b/scripts/install @@ -210,7 +210,7 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=4 # Create a dedicated systemd config ynh_add_systemd_config --others_var="\ port \ - RUBY_VERSION \ + RBENV_ROOT \ " #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 95f9101..fa1c6c0 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -310,7 +310,7 @@ ynh_script_progression --message="Upgrading systemd configuration..." --weight=1 # Create a dedicated systemd config ynh_add_systemd_config --others_var="\ port \ - RUBY_VERSION \ + RBENV_ROOT \ " #=================================================