1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/movim_ynh.git synced 2024-09-03 19:46:19 +02:00

Use helpers for user creation and deletion

This commit is contained in:
Jean-Baptiste Holcroft 2018-08-12 00:10:46 +02:00
parent f0da3da5dc
commit 709d745b73
3 changed files with 7 additions and 7 deletions

View file

@ -121,8 +121,8 @@ ynh_replace_string "//ws/" "/ws/" "$finalnginxconf" # Avoid duplicate /
# CREATE DEDICATED USER # CREATE DEDICATED USER
#================================================= #=================================================
# Create movim system user and set permissions # Create a system user
useradd -d /var/www/movim -s /bin/sh movim ynh_system_user_create "$app"
#================================================= #=================================================
# PHP-FPM CONFIGURATION # PHP-FPM CONFIGURATION

View file

@ -82,5 +82,5 @@ fi
# REMOVE DEDICATED USER # REMOVE DEDICATED USER
#================================================= #=================================================
ynh_system_user_exists movim \ # Delete a system user
&& userdel movim ynh_system_user_delete "$app"

View file

@ -84,9 +84,8 @@ ynh_add_nginx_config
# CREATE DEDICATED USER # CREATE DEDICATED USER
#================================================= #=================================================
# Create movim user if not exists and set permissions # Create a dedicated user (if not existing)
ynh_system_user_exists movim \ ynh_system_user_create "$app"
|| useradd -d /var/www/movim -s /bin/sh movim
#================================================= #=================================================
# PHP-FPM CONFIGURATION # PHP-FPM CONFIGURATION
@ -140,6 +139,7 @@ ynh_app_setting_delete "$app" skipped_uris
yunohost app clearaccess movim yunohost app clearaccess movim
# Replace old public_site variable (if exists) by ssoenabled # Replace old public_site variable (if exists) by ssoenabled
# TODO: add clean support for old/new setting public_site/ssoenabled
if [ ! -z "$public_site" ]; then if [ ! -z "$public_site" ]; then
[[ $public_site = "Yes" ]] \ [[ $public_site = "Yes" ]] \
&& ssoenabled="No" \ && ssoenabled="No" \