1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/piwigo_ynh.git synced 2024-09-03 20:06:03 +02:00
This commit is contained in:
Éric Gaspar 2024-06-19 22:36:10 +02:00
parent 80999f50c8
commit ee61f190b1
6 changed files with 1 additions and 42 deletions

View file

@ -83,9 +83,6 @@ ram.runtime = "50M"
[resources.install_dir]
[resources.data_dir]
subdirs =["_data", "galleries", "upload"]
[resources.permissions]
main.url = "/"

View file

@ -8,16 +8,6 @@
# PERSONAL HELPERS
#=================================================
_create_data_dirs_if_required() {
dirs=(_data galleries upload)
for dir in "${dirs[@]}"; do
if [ ! -d "$data_dir/$dir" ]; then
rsync -a "$install_dir/$dir/" "$data_dir/$dir/"
fi
ynh_secure_remove "$install_dir/$dir"
done
}
#=================================================
# EXPERIMENTAL HELPERS
#=================================================

View file

@ -19,12 +19,6 @@ ynh_print_info --message="Declaring files to be backed up..."
ynh_backup --src_path="$install_dir"
#=================================================
# BACKUP THE DATA DIR
#=================================================
ynh_backup --src_path="$data_dir" --is_big
#=================================================
# BACKUP THE SYSTEM CONFIGURATION
#=================================================

View file

@ -26,19 +26,6 @@ ynh_setup_source --dest_dir="$install_dir/plugins" --source_id=log_failed_logins
chmod -R o-rwx "$install_dir"
chown -R "$app:www-data" "$install_dir"
#=================================================
# CREATE LINK TO DATA DIRECTORY
#=================================================
ynh_script_progression --message="Creating a data directory..."
ln -sd $data_dir/_data $install_dir/_data
ln -sd $data_dir/upload $install_dir/upload
ln -sd $data_dir/galleries $install_dir/galleries
chmod 750 "$data_dir"
chmod -R o-rwx "$data_dir"
chown -R $app:www-data "$data_dir"
#=================================================
# SYSTEM CONFIGURATIONS
#=================================================

View file

@ -18,15 +18,6 @@ ynh_restore_file --origin_path="$install_dir"
chmod -R o-rwx "$install_dir"
chown -R "$app:www-data" "$install_dir"
#=================================================
# RESTORE THE DATA DIRECTORY
#=================================================
ynh_script_progression --message="Restoring the data directory..." --weight=2
ynh_restore_file --origin_path="$data_dir" --not_mandatory
chown -R "$app:www-data" "$data_dir"
#=================================================
# RESTORE THE MYSQL DATABASE
#=================================================

View file

@ -25,7 +25,7 @@ fi
#=================================================
ynh_script_progression --message="Upgrading source files..." --weight=3
ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="local/config/config.inc.php local/config/database.inc.php"
ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="local/config/config.inc.php local/config/database.inc.php _data galleries upload"
ynh_setup_source --dest_dir="$install_dir/plugins/Ldap_Login" --source_id=ldap_plugin --full_replace=1
ynh_setup_source --dest_dir="$install_dir/plugins" --source_id=log_failed_logins_plugin --full_replace=1