From ab152adffe6fac341f1db159b3005cdde0b35005 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 4 Jun 2020 15:04:08 +0200 Subject: [PATCH] remoce sudo su ! [YEP-2.12] You should not need to use 'sudo', the script is being run as root. (If you need to run a command using a specific user, use 'ynh_exec_as') --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 4f97183..87b8bac 100755 --- a/scripts/install +++ b/scripts/install @@ -135,7 +135,7 @@ then ynh_store_file_checksum --file="/etc/nginx/conf.d/$app-cache.conf" ynh_replace_string --match_string="{APP}" --replace_string="$app" --target_file="../conf/media.conf" ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/media.conf" - sudo su -c "cat ../conf/media.conf >> /etc/nginx/conf.d/$domain.d/$app.conf" + cat ../conf/media.conf >> /etc/nginx/conf.d/$domain.d/$app.conf ynh_store_file_checksum --file="/etc/nginx/conf.d/$domain.d/$app.conf" fi diff --git a/scripts/upgrade b/scripts/upgrade index 1871ea7..f52f470 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -208,7 +208,7 @@ then ynh_store_file_checksum --file="/etc/nginx/conf.d/$app-cache.conf" ynh_replace_string --match_string="{APP}" --replace_string="$app" --target_file="../conf/media.conf" ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/media.conf" - sudo su -c "cat ../conf/media.conf >> /etc/nginx/conf.d/$domain.d/$app.conf" + cat ../conf/media.conf >> /etc/nginx/conf.d/$domain.d/$app.conf ynh_store_file_checksum --file="/etc/nginx/conf.d/$domain.d/$app.conf" fi