From 7bd7499559ca97c42d2d74b8f7e90b88c5032f08 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 14 Apr 2021 20:12:05 +0200 Subject: [PATCH] fix rights --- conf/systemd.service | 2 +- scripts/install | 4 ++-- scripts/restore | 2 +- scripts/upgrade | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 1962bc5..655e184 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -14,7 +14,7 @@ Environment=RAILS_ENV=production Environment=UNICORN_SIDEKIQS=1 Environment=LD_PRELOAD=__LIBJEMALLOC__ Environment=UNICORN_LISTENER=__FINALPATH__/tmp/sockets/unicorn.sock -ExecStart=__RBENVROOT__/shims/bundle exec unicorn --config config/unicorn.conf.rb -E production +ExecStart=__RBENV_ROOT__/shims/bundle exec unicorn --config config/unicorn.conf.rb -E production Restart=always RestartSec=10 diff --git a/scripts/install b/scripts/install index 81a76de..bf6f6a2 100644 --- a/scripts/install +++ b/scripts/install @@ -112,7 +112,7 @@ ynh_setup_source --dest_dir="$final_path/plugins/discourse-ldap-auth" --source_i chmod 750 "$final_path" chmod -R o-rwx "$final_path" -chown -R $app:$app "$final_path" +chown -R $app:www-data "$final_path" #================================================= # NGINX CONFIGURATION @@ -278,7 +278,7 @@ patch -p1 < $YNH_CWD/../conf/ldap-auth-fix-subfolder.patch) #================================================= ynh_script_progression --message="Configuring a systemd service..." -ynh_replace_string --match_string="__RBENVROOT__" --replace_string="$RBENV_ROOT" --target_file="../conf/systemd.service" +ynh_replace_string --match_string="__RBENV_ROOT__" --replace_string="$RBENV_ROOT" --target_file="../conf/systemd.service" # We assume for the moment that ARM devices are only dual core, so # we restrict the number of workers to 2 (the default is 3) diff --git a/scripts/restore b/scripts/restore index 87f32e0..22feb02 100644 --- a/scripts/restore +++ b/scripts/restore @@ -72,7 +72,7 @@ ynh_restore_file --origin_path="$final_path" chmod 750 "$final_path" chmod -R o-rwx "$final_path" -chown -R $app:$app "$final_path" +chown -R $app:www-data "$final_path" #================================================= # SPECIFIC RESTORATION diff --git a/scripts/upgrade b/scripts/upgrade index ab0236c..efbe806 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -165,7 +165,7 @@ fi chmod 750 "$final_path" chmod -R o-rwx "$final_path" -chown -R $app:$app "$final_path" +chown -R $app:www-data "$final_path" #================================================= # NGINX CONFIGURATION @@ -335,7 +335,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Configuring a systemd service..." - ynh_replace_string --match_string="__RBENVROOT__" --replace_string="$RBENV_ROOT" --target_file="../conf/systemd.service" + ynh_replace_string --match_string="__RBENV_ROOT__" --replace_string="$RBENV_ROOT" --target_file="../conf/systemd.service" additional_env="UNICORN_WORKERS=$unicorn_workers" ynh_replace_string --match_string="__ADDITIONAL_ENV__" --replace_string="$additional_env" --target_file="../conf/systemd.service"