mirror of
https://github.com/YunoHost-Apps/vikunja_ynh.git
synced 2024-09-03 18:06:26 +02:00
Fix issues with scripts
- Change an "rm -rf" to "ynh_secure_remove" for the remove script. - Add the config file to the backup and restore scripts. - Fix incorrect "chmod" for the restore and upgrade scripts. - Fix missing "architecture" variable for the upgrade script.
This commit is contained in:
parent
ea9414d952
commit
7a5e59b9ed
4 changed files with 15 additions and 10 deletions
|
@ -39,6 +39,9 @@ ynh_print_info --message="Declaring files to be backed up..."
|
|||
# Frontend
|
||||
ynh_backup --src_path="$final_path"
|
||||
|
||||
# Config
|
||||
ynh_backup --src_path="/etc/vikunja/config.yml"
|
||||
|
||||
# Backend
|
||||
ynh_backup --src_path="/opt/vikunja"
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ ynh_system_user_delete --username=$app
|
|||
ynh_script_progression --message="Removing backend..." --weight=1
|
||||
|
||||
# Delete /opt/vikunja
|
||||
rm -rf "/opt/vikunja"
|
||||
ynh_secure_remove --file="/opt/vikunja"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
|
@ -61,15 +61,17 @@ ynh_script_progression --message="Restoring $app main directory..." --weight=4
|
|||
|
||||
# Frontend
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
|
||||
# Backend
|
||||
ynh_restore_file --origin_path="/opt/vikunja"
|
||||
|
||||
chmod +x "/opt/vikunja/vikunja"
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
chmod +x "$final_path/vikunja"
|
||||
|
||||
# Config
|
||||
ynh_restore_file --origin_path="/etc/vikunja/config.yml"
|
||||
|
||||
# Backend
|
||||
ynh_restore_file --origin_path="/opt/vikunja"
|
||||
chmod +x "/opt/vikunja/vikunja"
|
||||
chown -R $app:www-data "/opt/vikunja/files"
|
||||
|
||||
#=================================================
|
||||
# REINSTALL DEPENDENCIES
|
||||
|
|
|
@ -25,6 +25,7 @@ db_user=$db_name
|
|||
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
|
||||
timezone="$(cat /etc/timezone)"
|
||||
secret=$(ynh_string_random --length=32)
|
||||
architecture=$YNH_ARCH
|
||||
|
||||
set_motd=$(ynh_app_setting_get --app=$app --key=set_motd)
|
||||
enable_registration=$(ynh_app_setting_get --app=$app --key=enable_registration)
|
||||
|
@ -113,12 +114,11 @@ then
|
|||
cp "$back" "/opt/vikunja/vikunja"
|
||||
fi
|
||||
|
||||
chmod +x "/opt/vikunja/vikunja"
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
chmod +x "$final_path/vikunja"
|
||||
chown -R $app:www-data "$final_path/files"
|
||||
chmod +x "/opt/vikunja/vikunja"
|
||||
chown -R $app:www-data "/opt/vikunja/files"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
|
|
Loading…
Add table
Reference in a new issue