From ef622ffe4d52415887edef9a926abd81ad57bf9e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 1 Jul 2024 18:24:58 +0200 Subject: [PATCH] helpers2.1: switch to posisional args for ynh_multimedia_addaccess because that's what 99% of apps already do --- helpers/helpers.v2.1.d/multimedia | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/helpers/helpers.v2.1.d/multimedia b/helpers/helpers.v2.1.d/multimedia index d71346969..270ae1950 100644 --- a/helpers/helpers.v2.1.d/multimedia +++ b/helpers/helpers.v2.1.d/multimedia @@ -78,19 +78,12 @@ ynh_multimedia_addfolder() { setfacl -RL -m m::rwx "$source_dir" } -# Allow an user to have an write authorisation in multimedia directories +# Add an user to the multimedia group, in turn having write permission in multimedia directories # # usage: ynh_multimedia_addaccess user_name # -# | arg: --user_name= - The name of the user which gain this access. +# | arg: user_name - The name of the user which gain this access. ynh_multimedia_addaccess() { - - # ============ Argument parsing ============= - local -A args_array=([u]=user_name=) - local user_name - ynh_handle_getopts_args "$@" - # =========================================== - groupadd -f multimedia - usermod -a -G multimedia $user_name + usermod -a -G multimedia $1 }