From ff035cf60d4abb9a3e1fe716349fd1fd8ecf48de Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 30 Jul 2022 13:59:07 +0200 Subject: [PATCH] fix user --- scripts/install | 4 ++-- scripts/remove | 2 +- scripts/restore | 3 +-- scripts/upgrade | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/install b/scripts/install index 779f9fd..845fe5c 100755 --- a/scripts/install +++ b/scripts/install @@ -53,7 +53,7 @@ ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_script_progression --message="Configuring system user..." # Create a system user -ynh_system_user_create --username=$app --home_dir="$final_path" +ynh_system_user_create --username=ynh_$app --home_dir="$final_path" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -66,7 +66,7 @@ ynh_setup_source --dest_dir="$final_path" chmod 750 "$final_path" chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" +chown -R ynh_$app:www-data "$final_path" #================================================= # NGINX CONFIGURATION diff --git a/scripts/remove b/scripts/remove index 7afcdd1..e86b35a 100755 --- a/scripts/remove +++ b/scripts/remove @@ -45,7 +45,7 @@ ynh_remove_nginx_config ynh_script_progression --message="Removing the dedicated system user..." # Delete a system user -ynh_system_user_delete --username=$app +ynh_system_user_delete --username=ynh_$app #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 2f04dc4..d48b366 100644 --- a/scripts/restore +++ b/scripts/restore @@ -55,8 +55,7 @@ ynh_restore_file --origin_path="$final_path" chmod 750 "$final_path" chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" - +chown -R ynh_$app:www-data "$final_path" #================================================= # RESTORE THE NGINX CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 467de75..1c53880 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -74,7 +74,7 @@ fi chmod 750 "$final_path" chmod -R o-rwx "$final_path" -chown -R $app:www-data "$final_path" +chown -R ynh_$app:www-data "$final_path" #================================================= # NGINX CONFIGURATION