mirror of
https://github.com/YunoHost-Apps/borgwarehouse_ynh.git
synced 2024-09-03 18:16:17 +02:00
Tests +upgrade 2.2.1
This commit is contained in:
parent
edfe0a8be5
commit
27ec1770c9
4 changed files with 22 additions and 4 deletions
|
@ -21,6 +21,15 @@ ynh_print_info --message="Declaring files to be backed up..."
|
||||||
|
|
||||||
ynh_backup --src_path="$install_dir"
|
ynh_backup --src_path="$install_dir"
|
||||||
|
|
||||||
|
unlink "/home/$app/repos"
|
||||||
|
ynh_backup --src_path="/home/$app"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# BACKUP THE REPOS DIRECTORY
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_backup --src_path="/home/yunohost.app/$app" --is_big
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE NGINX CONFIGURATION
|
# BACKUP THE NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -38,10 +38,10 @@ ynh_script_progression --message="Setting up source files..." --weight=1
|
||||||
# Download, check integrity, uncompress and patch the source from manifest.toml
|
# Download, check integrity, uncompress and patch the source from manifest.toml
|
||||||
ynh_setup_source --dest_dir="$install_dir/app"
|
ynh_setup_source --dest_dir="$install_dir/app"
|
||||||
|
|
||||||
mkdir /home/$app
|
mkdir -p "/home/$app/.ssh" && chmod 700 "/home/$app/.ssh"
|
||||||
mkdir /home/$app/.ssh && chmod 700 /home/$app/.ssh
|
touch "/home/$app/.ssh/authorized_keys" && chmod 600 "/home/$app/.ssh/authorized_keys"
|
||||||
touch /home/$app/.ssh/authorized_keys && chmod 600 /home/$app/.ssh/authorized_keys
|
mkdir "/home/yunohost.app/$app" && chmod 700 "/home/yunohost.app/$app"
|
||||||
mkdir $install_dir/repos && chmod 700 $install_dir/repos
|
ln -s "/home/yunohost.app/$app" "/home/$app/repos" && chmod 700 "/home/$app/repos"
|
||||||
|
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
chown -R $app:www-data "/home/$app"
|
chown -R $app:www-data "/home/$app"
|
||||||
|
|
|
@ -33,6 +33,8 @@ ynh_secure_remove --file="/etc/cron.d/$app"
|
||||||
|
|
||||||
ynh_secure_remove --file="/home/$app"
|
ynh_secure_remove --file="/home/$app"
|
||||||
|
|
||||||
|
ynh_secure_remove --file="/home/yunohost.app/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -19,6 +19,13 @@ ynh_restore_file --origin_path="$install_dir"
|
||||||
|
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
||||||
|
ynh_restore_file --origin_path="/home/$app"
|
||||||
|
ynh_restore_file --origin_path="/home/yunohost.app/$app"
|
||||||
|
|
||||||
|
chown -R $app:www-data "/home/$app"
|
||||||
|
chown -R $app:www-data "/home/yunohost.app/$app" --not_mandatory
|
||||||
|
ln -s "/home/yunohost.app/$app" "/home/$app/repos" && chmod 700 "/home/$app/repos"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REINSTALL DEPENDENCIES
|
# REINSTALL DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue