Browse Source

Fix misc issues

pull/64/head
Alexandre Aubin 5 years ago
parent
commit
9969e5a7b7
  1. 11
      scripts/backup
  2. 2
      scripts/install
  3. 9
      scripts/remove
  4. 2
      scripts/restore
  5. 4
      scripts/upgrade

11
scripts/backup

@ -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
#=================================================

2
scripts/install

@ -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"

9
scripts/remove

@ -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

2
scripts/restore

@ -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"

4
scripts/upgrade

@ -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"

Loading…
Cancel
Save