mirror of
https://github.com/YunoHost-Apps/grav_ynh.git
synced 2024-09-03 19:16:01 +02:00
Merge pull request #163 from YunoHost-Apps/fix-backups
This commit is contained in:
commit
d4d6c3ef00
14 changed files with 41 additions and 8 deletions
|
@ -19,7 +19,7 @@ It shall NOT be edited by hand.
|
|||
Grav is a modern open source flat-file CMS.
|
||||
|
||||
|
||||
**Shipped version:** 1.7.45~ynh2
|
||||
**Shipped version:** 1.7.45~ynh3
|
||||
|
||||
**Demo:** <https://getgrav.org/downloads/themes>
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ EZ editatu eskuz.
|
|||
Grav is a modern open source flat-file CMS.
|
||||
|
||||
|
||||
**Paketatutako bertsioa:** 1.7.45~ynh2
|
||||
**Paketatutako bertsioa:** 1.7.45~ynh3
|
||||
|
||||
**Demoa:** <https://getgrav.org/downloads/themes>
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main.
|
|||
Un CMS moderne basé sur des fichiers plats
|
||||
|
||||
|
||||
**Version incluse :** 1.7.45~ynh2
|
||||
**Version incluse :** 1.7.45~ynh3
|
||||
|
||||
**Démo :** <https://getgrav.org/downloads/themes>
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ NON debe editarse manualmente.
|
|||
Grav is a modern open source flat-file CMS.
|
||||
|
||||
|
||||
**Versión proporcionada:** 1.7.45~ynh2
|
||||
**Versión proporcionada:** 1.7.45~ynh3
|
||||
|
||||
**Demo:** <https://getgrav.org/downloads/themes>
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
Grav is a modern open source flat-file CMS.
|
||||
|
||||
|
||||
**分发版本:** 1.7.45~ynh2
|
||||
**分发版本:** 1.7.45~ynh3
|
||||
|
||||
**演示:** <https://getgrav.org/downloads/themes>
|
||||
|
||||
|
|
4
conf/scheduler.yaml
Normal file
4
conf/scheduler.yaml
Normal file
|
@ -0,0 +1,4 @@
|
|||
status:
|
||||
cache-purge: enabled
|
||||
cache-clear: enabled
|
||||
default-site-backup: disabled
|
|
@ -8,3 +8,6 @@
|
|||
2. `sudo -u __APP__ php__PHPVERSION__ bin/grav ...` or `sudo -u __APP__ php__PHPVERSION__bin/gpm ...`
|
||||
* You can install plugins through the admin panel, or through the GPM.
|
||||
* If installing Grav at the root of a domain, bear in mind that paths starting by `/yunohost` are reserved.
|
||||
* Grav's automated daily self-backups are disabled by default
|
||||
* Grav's self-backups are not backed up by YunoHost
|
||||
* Daily cache purge and clear are enabled by default
|
||||
|
|
|
@ -8,3 +8,6 @@
|
|||
2. `sudo -u __APP__ php__PHPVERSION__ bin/grav ...` ou `sudo -u __APP__ php__PHPVERSION__ bin/gpm ...`
|
||||
* Vous pouvez installer les extensions soit via le panneau d'administration, soit via GPM.
|
||||
* Si vous installez Grav à la racine d'un domaine, sachez que les chemins d'accès commençant par `/yunohost` sont réservés.
|
||||
* Les auto-sauvegardes quotidiennes automatiques de Grav sont désactivées par défaut
|
||||
* Les auto-sauvegardes de Grav ne sont pas contenues dans les sauvegardes générées par YunoHost
|
||||
* Le nettoyage et la purge quotidienne du cache sont activés par défaut
|
||||
|
|
5
doc/POST_UPGRADE.d/1.7.45~ynh3.md
Normal file
5
doc/POST_UPGRADE.d/1.7.45~ynh3.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
Before v1.7.45~ynh3 of this package, an upstream quirk made the app generate a backup daily, despite the default configuration suggesting it to be disabled.
|
||||
|
||||
Starting this version, if you had not already altered the Scheduler configuration, this is fixed.
|
||||
|
||||
The backups directory is also not backed up by YunoHost anymore, as it was superfluous.
|
|
@ -5,7 +5,7 @@ name = "Grav"
|
|||
description.en = "Modern open source flat-file CMS"
|
||||
description.fr = "CMS moderne basé sur des fichiers plats"
|
||||
|
||||
version = "1.7.45~ynh2"
|
||||
version = "1.7.45~ynh3"
|
||||
|
||||
maintainers = ["tituspijean"]
|
||||
|
||||
|
|
|
@ -19,7 +19,10 @@ ynh_print_info --message="Declaring files to be backed up..."
|
|||
# BACKUP THE APP MAIN DIR
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="$install_dir"
|
||||
# Backup install_dir except backup and cache directory
|
||||
for f in $(ls "$install_dir" -I backup -I cache); do
|
||||
ynh_backup --src_path="${install_dir}/$f"
|
||||
done
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
|
|
|
@ -58,7 +58,12 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1
|
|||
ynh_exec_as $app mkdir -p "$install_dir/user/config/plugins/login-ldap"
|
||||
ynh_exec_as $app touch "$install_dir/user/accounts/admin.yaml"
|
||||
|
||||
# Setting up config
|
||||
# Setting up scheduler config
|
||||
ynh_add_config --template="../conf/scheduler.yaml" --destination="$install_dir/user/config/scheduler.yaml"
|
||||
chown $app:$app "$install_dir/user/config/scheduler.yaml"
|
||||
chmod 640 "$install_dir/user/config/scheduler.yaml"
|
||||
|
||||
# Setting up LDAP config
|
||||
ynh_add_config --template="../conf/login-ldap.yaml" --destination="$install_dir/user/config/plugins/login-ldap.yaml"
|
||||
chown $app:$app "$install_dir/user/config/plugins/login-ldap.yaml"
|
||||
chmod 640 "$install_dir/user/config/plugins/login-ldap.yaml"
|
||||
|
|
|
@ -17,6 +17,9 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
|
|||
|
||||
ynh_restore_file --origin_path="$install_dir"
|
||||
|
||||
# Grav will complain about missing backup directory, let's create it
|
||||
mkdir -p "$install_dir/backup"
|
||||
|
||||
chown -R $app:www-data "$install_dir"
|
||||
find "$install_dir" -type f -exec chmod 640 {} \;
|
||||
find "$install_dir/bin" -type f -exec chmod 750 {} \;
|
||||
|
|
|
@ -29,6 +29,13 @@ if [ -z "${with_sftp:-}" ] || [ -z "${password:-}" ]; then
|
|||
ynh_app_setting_set --app=$app --key=password --value=$(ynh_string_random)
|
||||
fi
|
||||
|
||||
# Setup the scheduler config if it is missing from user directory
|
||||
if [ ! -f "$install_dir/user/config/scheduler.yaml" ]; then
|
||||
ynh_add_config --template="../conf/scheduler.yaml" --destination="$install_dir/user/config/scheduler.yaml"
|
||||
chown $app:$app "$install_dir/user/config/scheduler.yaml"
|
||||
chmod 640 "$install_dir/user/config/scheduler.yaml"]
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue