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

Fix misc issues

This commit is contained in:
Alexandre Aubin 2021-05-10 17:01:39 +02:00
parent 12a0d94a4f
commit 9969e5a7b7
5 changed files with 3 additions and 25 deletions

View file

@ -63,17 +63,6 @@ then
ynh_mysql_dump_db --database="$db_name" > db.sql
fi
#=================================================
# BACKUP SPECIFIC FILES
#=================================================
if [ $with_sftp -eq 1 ]
then
ynh_print_info --message="Backup specific files..."
ynh_backup "/usr/share/yunohost/hooks/conf_regen/90-ssh_$app"
fi
#=================================================
# END OF SCRIPT
#=================================================

View file

@ -128,7 +128,7 @@ name: ${db_name}\nuser: ${db_name}\npass: ${db_pwd}" > ../sources/db_access.txt
cp -r "../sources/db_access.txt" "$final_path/db_access.txt"
fi
chown -R $app: "$final_path"
chown -R $app:www-data "$final_path"
# Home directory of the user needs to be owned by root to allow
# SFTP connections
chown root:root "$final_path"

View file

@ -64,15 +64,6 @@ ynh_remove_fpm_config
#=================================================
# SPECIFIC REMOVE
#=================================================
# REMOVE THE CUSTOM SSH CONFIG
#=================================================
if [ $with_sftp -eq 1 ]
then
ynh_script_progression --message="Removing the custom SSH config..."
ynh_secure_remove --file="/usr/share/yunohost/hooks/conf_regen/90-ssh_$app"
yunohost tools regen-conf ssh
fi
#=================================================
# GENERIC FINALIZATION

View file

@ -90,7 +90,7 @@ ynh_script_progression --message="Restoring the app main directory..."
ynh_restore_file --origin_path="$final_path"
# Restore permissions on app files
chown -R $app: "$final_path"
chown -R $app:www-data "$final_path"
# Home directory of the user needs to be owned by root to allow
# SFTP connections
chown root:root "$final_path"

View file

@ -147,8 +147,6 @@ ynh_script_progression --message="Making sure dedicated system user exists..." -
if [ $with_sftp -eq 1 ]
then
# Add the password to this user
chpasswd <<< "${app}:${password}"
groups="sftp.app"
else
groups=""
@ -189,7 +187,7 @@ fi
# SECURE FILES AND DIRECTORIES
#=================================================
chown -R $app: "$final_path"
chown -R $app:www-data "$final_path"
# Home directory of the user needs to be owned by root to allow
# SFTP connections
chown root:root "$final_path"