1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/keeweb_ynh.git synced 2024-09-03 19:26:33 +02:00
This commit is contained in:
ericgaspar 2022-02-04 15:41:24 +01:00
parent 4f0f627176
commit f6103ba9d5
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 33 additions and 8 deletions

View file

@ -50,6 +50,14 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=final_path --value=$final_path ynh_app_setting_set --app=$app --key=final_path --value=$final_path
#=================================================
# CREATE DEDICATED USER
#=================================================
ynh_script_progression --message="Configuring system user..."
# Create a system user
ynh_system_user_create --username=$app --home_dir="$final_path"
#================================================= #=================================================
# STANDARD MODIFICATIONS # STANDARD MODIFICATIONS
#================================================= #=================================================
@ -90,7 +98,9 @@ ynh_add_config --template="../conf/config.json" --destination="$final_path/confi
#================================================= #=================================================
# Les fichiers appartiennent à root # Les fichiers appartiennent à root
chown -R root: $final_path chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#================================================= #=================================================
# SETUP SSOWAT # SETUP SSOWAT

View file

@ -37,6 +37,14 @@ ynh_script_progression --message="Removing NGINX web server configuration..."
# Remove the dedicated NGINX config # Remove the dedicated NGINX config
ynh_remove_nginx_config ynh_remove_nginx_config
#=================================================
# REMOVE DEDICATED USER
#=================================================
ynh_script_progression --message="Removing the dedicated system user..."
# Delete a system user
ynh_system_user_delete --username=$app
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================

View file

@ -38,21 +38,28 @@ test ! -d $final_path || ynh_die "There is already a directory: $final_path "
#================================================= #=================================================
# RESTORE OF THE NGINX CONFIGURATION # RESTORE OF THE NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Restoring the NGINX configuration..."
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RECREATE THE DEDICATED USER
#=================================================
ynh_script_progression --message="Recreating the dedicated system user..."
# Create the dedicated user (if not existing)
ynh_system_user_create --username=$app --home_dir="$final_path"
#================================================= #=================================================
# RESTORE OF THE MAIN DIR OF THE APP # RESTORE OF THE MAIN DIR OF THE APP
#================================================= #=================================================
ynh_script_progression --message="Restoring the app main directory..."
ynh_restore_file --origin_path="$final_path" ynh_restore_file --origin_path="$final_path"
#================================================= chmod 750 "$final_path"
# RESTORE USER RIGHTS chmod -R o-rwx "$final_path"
#================================================= chown -R $app:www-data "$final_path"
# Les fichiers appartiennent à root
chown -R root: $final_path
#================================================= #=================================================
# GENERIC FINALISATION # GENERIC FINALISATION

View file

@ -62,7 +62,7 @@ fi
if [ "$upgrade_type" == "UPGRADE_APP" ] if [ "$upgrade_type" == "UPGRADE_APP" ]
then then
ynh_script_progression --message="Upgrading source files..." --time --weight=1 ynh_script_progression --message="Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
mkdir -p "$final_path" mkdir -p "$final_path"