mirror of
https://github.com/YunoHost-Apps/synapse_ynh.git
synced 2024-09-03 20:26:38 +02:00
Remove yunohost user creation
This commit is contained in:
parent
fe8b5b0119
commit
fbeb092ac4
4 changed files with 2 additions and 20 deletions
|
@ -120,11 +120,7 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Creating $app user..." --weight=1
|
ynh_script_progression --message='Configuring system groups'
|
||||||
|
|
||||||
synapse_user_app_pwd="$(ynh_string_random --length=30)"
|
|
||||||
ynh_app_setting_set --app=$app --key=synapse_user_app_pwd --value=$synapse_user_app_pwd
|
|
||||||
# yunohost user create $app -F "Synapse Application" -d $domain -p "$synapse_user_app_pwd"
|
|
||||||
|
|
||||||
adduser $app ssl-cert
|
adduser $app ssl-cert
|
||||||
adduser turnserver ssl-cert
|
adduser turnserver ssl-cert
|
||||||
|
|
|
@ -77,12 +77,6 @@ ynh_remove_fail2ban_config
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE DEDICATED USER
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Removing the dedicated system user" --weight=1
|
|
||||||
|
|
||||||
# Delete a system user
|
|
||||||
yunohost user delete $app
|
|
||||||
|
|
||||||
ynh_script_progression --message="Removal of $app completed" --last
|
ynh_script_progression --message="Removal of $app completed" --last
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
|
@ -19,10 +19,9 @@ ynh_script_progression --message="Loading settings..."
|
||||||
#=================================================
|
#=================================================
|
||||||
# RECREATE THE DEDICATED USER
|
# RECREATE THE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Recreating the dedicated system user..." --weight=3
|
ynh_script_progression --message='Configuring system groups'
|
||||||
|
|
||||||
# Create the dedicated user (if not existing)
|
# Create the dedicated user (if not existing)
|
||||||
yunohost user create $app -F "Synapse Application" -d $domain -p "$synapse_user_app_pwd"
|
|
||||||
adduser $app ssl-cert
|
adduser $app ssl-cert
|
||||||
adduser turnserver ssl-cert
|
adduser turnserver ssl-cert
|
||||||
|
|
||||||
|
|
|
@ -213,13 +213,6 @@ then
|
||||||
ynh_app_setting_set --app=$app --key=push_include_content --value=$push_include_content
|
ynh_app_setting_set --app=$app --key=push_include_content --value=$push_include_content
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z $synapse_user_app_pwd ]; then
|
|
||||||
synapse_user_app_pwd="$(ynh_string_random --length=30)"
|
|
||||||
ynh_app_setting_set --app=$app --key=synapse_user_app_pwd --value=$synapse_user_app_pwd
|
|
||||||
# The format to create an user account varies depending on the version of YunoHost currently installed.
|
|
||||||
yunohost user create $app -F "Synapse Application" -d $domain -p "$synapse_user_app_pwd"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MIGRATION 7 : STANDARDIZE SYSTEMD UNIT
|
# MIGRATION 7 : STANDARDIZE SYSTEMD UNIT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue