From fb26fdf43c76256c2eb0d7e3a722ff4ded7054ef Mon Sep 17 00:00:00 2001 From: Florent Date: Sun, 10 Mar 2024 22:05:42 +0100 Subject: [PATCH] add ynh_permission_update --- scripts/install | 5 +++++ scripts/restore | 2 ++ scripts/upgrade | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/scripts/install b/scripts/install index 56785b3..15653a0 100755 --- a/scripts/install +++ b/scripts/install @@ -35,6 +35,11 @@ ynh_add_config --template="custom.env" --destination="$data_dir/custom.env" chmod 600 "$data_dir/custom.env" chown "$app:$app" "$data_dir/custom.env" +#================================================= +# SET PERMISSION FOR THE USER +#================================================= +ynh_permission_update --permission="main" --add="$admin" + #================================================= # SYSTEM CONFIGURATION #================================================= diff --git a/scripts/restore b/scripts/restore index 8209a2f..15186a9 100755 --- a/scripts/restore +++ b/scripts/restore @@ -41,6 +41,8 @@ systemctl enable "$app.service" --quiet yunohost service add "$app" --description="The hacker's notebook" +ynh_permission_update --permission="main" --add="$admin" + #================================================= # RELOAD NGINX AND PHP-FPM OR THE APP SERVICE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 2fa72f5..42d0b9c 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -40,6 +40,11 @@ ynh_add_config --template="custom.env" --destination="$data_dir/custom.env" chmod 600 "$data_dir/custom.env" chown "$app:$app" "$data_dir/custom.env" +#================================================= +# SET PERMISSION FOR THE USER +#================================================= +ynh_permission_update --permission="main" --add="$admin" + #================================================= # REAPPLY SYSTEM CONFIGURATIONS #=================================================