From 8874807ebd1ae7e304e9f6592621b840c3c69d28 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Thu, 10 Jun 2021 17:23:34 +0200 Subject: [PATCH] Remove ynh_exec_as --- manifest.json | 2 +- scripts/_common.sh | 15 --------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/manifest.json b/manifest.json index 67d6179..676ff4b 100644 --- a/manifest.json +++ b/manifest.json @@ -26,7 +26,7 @@ "email": "maniackc_dev@crudelis.fr" }], "requirements": { - "yunohost": ">= 4.1.7" + "yunohost": ">= 4.2.0" }, "multi_instance": true, "services": [ diff --git a/scripts/_common.sh b/scripts/_common.sh index dd120b1..b90154c 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -369,18 +369,3 @@ ynh_app_changelog () { echo "No significative changes from the changelog..." > "${final_changelog}_lite" fi } - -#================================================= - -# Execute a command as another user -# usage: ynh_exec_as USER COMMAND [ARG ...] -ynh_exec_as() { - local USER=$1 - shift 1 - - if [[ $USER = $(whoami) ]]; then - eval "$@" - else - sudo -u "$USER" "$@" - fi -}