mirror of
https://github.com/YunoHost-Apps/archivist_ynh.git
synced 2024-09-03 18:15:55 +02:00
commit
f60a7cf379
18 changed files with 378 additions and 349 deletions
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -4,6 +4,16 @@ Changelog
|
||||||
## Unreleased
|
## Unreleased
|
||||||
- Nothing for now...
|
- Nothing for now...
|
||||||
|
|
||||||
|
## [1.3.2~ynh1]() - 2022-01-25
|
||||||
|
|
||||||
|
#### Fixed
|
||||||
|
- [Fix tar symlink for apps - archivist 1.3.2]()
|
||||||
|
|
||||||
|
## [1.3.1~ynh1](https://github.com/YunoHost-Apps/archivist_ynh/commit/a9070b11e13d37908cf246804c0d331a57fea115) - 2021-11-07
|
||||||
|
|
||||||
|
#### Fixed
|
||||||
|
- [Fix multimedia hook killing hard drives - archivist 1.3.1](https://github.com/YunoHost-Apps/archivist_ynh/commit/a9070b11e13d37908cf246804c0d331a57fea115)
|
||||||
|
|
||||||
## [1.3~ynh1](https://github.com/YunoHost-Apps/archivist_ynh/pull/40) - 2021-05-27
|
## [1.3~ynh1](https://github.com/YunoHost-Apps/archivist_ynh/pull/40) - 2021-05-27
|
||||||
|
|
||||||
#### Fixed
|
#### Fixed
|
||||||
|
|
59
README.md
59
README.md
|
@ -1,70 +1,59 @@
|
||||||
|
<!--
|
||||||
|
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
|
||||||
|
It shall NOT be edited by hand.
|
||||||
|
-->
|
||||||
|
|
||||||
# Archivist for YunoHost
|
# Archivist for YunoHost
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/archivist)  [](https://github.com/YunoHost/Apps/#what-to-do-if-i-cant-maintain-my-app-anymore-)
|
[](https://dash.yunohost.org/appci/app/archivist)  
|
||||||
[](https://install-app.yunohost.org/?app=archivist)
|
[](https://install-app.yunohost.org/?app=archivist)
|
||||||
|
|
||||||
*[Lire ce readme en français.](./README_fr.md)*
|
*[Lire ce readme en français.](./README_fr.md)*
|
||||||
|
|
||||||
> *This package allow you to install archivist quickly and simply on a YunoHost server.
|
> *This package allows you to install Archivist quickly and simply on a YunoHost server.
|
||||||
If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to know how to install and enjoy it.*
|
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
Archivist is an automatic backup system for your server.
|
Archivist is an automatic backup system for your server.
|
||||||
It able to makes backups of your YunoHost core and your apps by using the YunoHost backup command.
|
It able to makes backups of your YunoHost core and your apps by using the YunoHost backup command.
|
||||||
It can also makes backups of specified directories.
|
It can also makes backups of specified directories.
|
||||||
Your backups can be send to many other places, local or distant.
|
Your backups can be send to many other places, local or distant.
|
||||||
Archivist is automatically launched periodicaly to update your backups and send the modifications to the other places.
|
Archivist is automatically launched periodicaly to update your backups and send the modifications to the other places.
|
||||||
|
|
||||||
**Shipped version:** 1.3.1
|
|
||||||
|
|
||||||
## Screenshots
|
|
||||||
|
|
||||||
## Demo
|
**Shipped version:** 1.3.2~ynh2
|
||||||
|
## Disclaimers / important information
|
||||||
No demo available.
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
The configuration of archivist can be changed in the file /opt/yunohost/archivist/Backup_list.conf
|
The configuration of archivist can be changed in the file /opt/yunohost/archivist/Backup_list.conf
|
||||||
Please read the [documentation](https://github.com/maniackcrudelis/archivist/blob/master/Configuration.md) about the configuration of archivist for more informations.
|
Please read the [documentation](https://github.com/maniackcrudelis/archivist/blob/master/Configuration.md) about the configuration of archivist for more informations.
|
||||||
|
|
||||||
## Documentation
|
|
||||||
|
|
||||||
* YunoHost documentation: There no specific documentations, feel free to contribute.
|
|
||||||
|
|
||||||
## YunoHost specific features
|
|
||||||
|
|
||||||
#### Multi-users support
|
|
||||||
|
|
||||||
Not relevant.
|
|
||||||
|
|
||||||
#### Supported architectures
|
|
||||||
|
|
||||||
* x86-64b - [](https://ci-apps.yunohost.org/ci/apps/archivist/)
|
|
||||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/archivist/)
|
|
||||||
* Buster x86-64b - [](https://ci-buster.nohost.me/ci/apps/archivist/)
|
|
||||||
|
|
||||||
## Limitations
|
## Limitations
|
||||||
|
|
||||||
* Encfs, which be used to encrypt the data, is not fully secured.
|
* Encfs, which be used to encrypt the data, is not fully secured.
|
||||||
Have a look to the [security audit](https://defuse.ca/audits/encfs.htm) to have more informations.
|
Have a look to the [security audit](https://defuse.ca/audits/encfs.htm) to have more informations.
|
||||||
|
|
||||||
## Links
|
|
||||||
|
|
||||||
* Report a bug: https://github.com/YunoHost-Apps/archivist_ynh/issues
|
## Documentation and resources
|
||||||
* archivist website: https://github.com/maniackcrudelis/archivist
|
|
||||||
* YunoHost website: https://yunohost.org/
|
|
||||||
|
|
||||||
---
|
* Official app website: <https://github.com/maniackcrudelis/archivist>
|
||||||
|
* Upstream app code repository: <https://github.com/maniackcrudelis/archivist>
|
||||||
|
* YunoHost documentation for this app: <https://yunohost.org/app_archivist>
|
||||||
|
* Report a bug: <https://github.com/YunoHost-Apps/archivist_ynh/issues>
|
||||||
|
|
||||||
Developers infos
|
## Developer info
|
||||||
----------------
|
|
||||||
|
|
||||||
Please do your pull request to the [testing branch](https://github.com/YunoHost-Apps/archivist_ynh/tree/testing).
|
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/archivist_ynh/tree/testing).
|
||||||
|
|
||||||
To try the testing branch, please proceed like that.
|
To try the testing branch, please proceed like that.
|
||||||
```
|
|
||||||
sudo yunohost app install https://github.com/YunoHost-Apps/archivist_ynh/tree/testing --force --debug
|
``` bash
|
||||||
|
sudo yunohost app install https://github.com/YunoHost-Apps/archivist_ynh/tree/testing --debug
|
||||||
or
|
or
|
||||||
sudo yunohost app upgrade archivist -u https://github.com/YunoHost-Apps/archivist_ynh/tree/testing --debug
|
sudo yunohost app upgrade archivist -u https://github.com/YunoHost-Apps/archivist_ynh/tree/testing --debug
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**More info regarding app packaging:** <https://yunohost.org/packaging_apps>
|
||||||
|
|
64
README_fr.md
64
README_fr.md
|
@ -1,72 +1,58 @@
|
||||||
|
<!--
|
||||||
|
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
|
||||||
|
It shall NOT be edited by hand.
|
||||||
|
-->
|
||||||
|
|
||||||
# Archivist pour YunoHost
|
# Archivist pour YunoHost
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/archivist)  [](https://github.com/YunoHost/Apps/#what-to-do-if-i-cant-maintain-my-app-anymore-)
|
[](https://dash.yunohost.org/appci/app/archivist)  
|
||||||
[](https://install-app.yunohost.org/?app=archivist)
|
[](https://install-app.yunohost.org/?app=archivist)
|
||||||
|
|
||||||
*[Read this readme in english.](./README.md)*
|
*[Read this readme in english.](./README.md)*
|
||||||
|
|
||||||
> *Ce package vous permet d'installer archivist rapidement et simplement sur un serveur YunoHost.
|
> *Ce package vous permet d'installer Archivist rapidement et simplement sur un serveur YunoHost.
|
||||||
Si vous n'avez pas YunoHost, merci de regarder [ici](https://yunohost.org/#/install_fr) pour savoir comment l'installer et en profiter.*
|
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
|
||||||
|
|
||||||
|
## Vue d'ensemble
|
||||||
|
|
||||||
## Résumé
|
|
||||||
Archivist est un système de sauvegarde automatique pour votre serveur.
|
Archivist est un système de sauvegarde automatique pour votre serveur.
|
||||||
Il est capable de faire des sauvegardes de votre noyau YunoHost et de vos applications en utilisant la commande de backup de YunoHost.
|
Il est capable de faire des sauvegardes de votre noyau YunoHost et de vos applications en utilisant la commande de backup de YunoHost.
|
||||||
Il peut également faire des sauvegardes de répertoires spécifiques.
|
Il peut également faire des sauvegardes de répertoires spécifiques.
|
||||||
Vos sauvegardes peuvent être envoyées à de nombreux autres endroits, locaux ou distants.
|
Vos sauvegardes peuvent être envoyées à de nombreux autres endroits, locaux ou distants.
|
||||||
Archivist est automatiquement lancé périodiquement pour mettre à jour vos sauvegardes et envoyer les modifications aux autres emplacements.
|
Archivist est automatiquement lancé périodiquement pour mettre à jour vos sauvegardes et envoyer les modifications aux autres emplacements.
|
||||||
|
|
||||||
**Version embarquée:** 1.3.1
|
|
||||||
|
|
||||||
## Captures d'écran
|
**Version incluse :** 1.3.2~ynh2
|
||||||
|
## Avertissements / informations importantes
|
||||||
## Démo
|
|
||||||
|
|
||||||
Aucune démo pour cette application.
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
La configuration d'archivist peut être modifiée dans le fichier /opt/yunohost/archivist/Backup_list.conf
|
La configuration d'archivist peut être modifiée dans le fichier /opt/yunohost/archivist/Backup_list.conf
|
||||||
Veuillez lire la [documentation](https://github.com/maniackcrudelis/archivist/blob/master/Configuration_fr.md) sur la configuration d'archivist pour plus d'informations.
|
Veuillez lire la [documentation](https://github.com/maniackcrudelis/archivist/blob/master/Configuration_fr.md) sur la configuration d'archivist pour plus d'informations.
|
||||||
|
|
||||||
## Documentation
|
|
||||||
|
|
||||||
* Documentation YunoHost: Il n'y a pas d'autre documentation, n'hésitez pas à contribuer.
|
|
||||||
|
|
||||||
## Fonctionnalités spécifiques à YunoHost
|
|
||||||
|
|
||||||
#### Support multi-utilisateurs
|
|
||||||
|
|
||||||
Non applicable
|
|
||||||
|
|
||||||
#### Architectures supportées.
|
|
||||||
|
|
||||||
* x86-64b - [](https://ci-apps.yunohost.org/ci/apps/archivist/)
|
|
||||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/archivist/)
|
|
||||||
* Buster x86-64b - [](https://ci-buster.nohost.me/ci/apps/archivist/)
|
|
||||||
|
|
||||||
## Limitations
|
## Limitations
|
||||||
|
|
||||||
* Encfs, qui est utilisé pour chiffrer les données, n'est pas parfaitement sécurisé.
|
* Encfs, qui est utilisé pour chiffrer les données, n'est pas parfaitement sécurisé.
|
||||||
Consultez l'[audit de sécurité](https://defuse.ca/audits/encfs.htm) pour avoir plus d'informations.
|
Consultez l'[audit de sécurité](https://defuse.ca/audits/encfs.htm) pour avoir plus d'informations.
|
||||||
|
|
||||||
## Informations additionnelles
|
|
||||||
|
|
||||||
## Liens
|
## Documentations et ressources
|
||||||
|
|
||||||
* Reporter un bug: https://github.com/YunoHost-Apps/archivist_ynh/issues
|
* Site officiel de l'app : <https://github.com/maniackcrudelis/archivist>
|
||||||
* Site de archivist: https://github.com/maniackcrudelis/archivist
|
* Dépôt de code officiel de l'app : <https://github.com/maniackcrudelis/archivist>
|
||||||
* Site de YunoHost: https://yunohost.org/
|
* Documentation YunoHost pour cette app : <https://yunohost.org/app_archivist>
|
||||||
|
* Signaler un bug : <https://github.com/YunoHost-Apps/archivist_ynh/issues>
|
||||||
|
|
||||||
---
|
## Informations pour les développeurs
|
||||||
|
|
||||||
Informations à l'intention des développeurs
|
|
||||||
----------------
|
|
||||||
|
|
||||||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/archivist_ynh/tree/testing).
|
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/archivist_ynh/tree/testing).
|
||||||
|
|
||||||
Pour tester la branche testing, merci de procéder ainsi.
|
Pour essayer la branche testing, procédez comme suit.
|
||||||
```
|
|
||||||
sudo yunohost app install https://github.com/YunoHost-Apps/archivist_ynh/tree/testing --force --debug
|
``` bash
|
||||||
|
sudo yunohost app install https://github.com/YunoHost-Apps/archivist_ynh/tree/testing --debug
|
||||||
ou
|
ou
|
||||||
sudo yunohost app upgrade archivist -u https://github.com/YunoHost-Apps/archivist_ynh/tree/testing --debug
|
sudo yunohost app upgrade archivist -u https://github.com/YunoHost-Apps/archivist_ynh/tree/testing --debug
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/maniackcrudelis/archivist/archive/refs/tags/v1.3.1.tar.gz
|
SOURCE_URL=https://github.com/maniackcrudelis/archivist/archive/refs/tags/v1.3.2.tar.gz
|
||||||
SOURCE_SUM=1333254f3c2713aec5c802ba661788b12ca9261bce204476a0715a9205c74ec9
|
SOURCE_SUM=b87fa47d999a35c7d583cf4fb0cdfe9648ff58a69dec031789482886c2e3e5c4
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
0
doc/.gitkeep
Normal file
0
doc/.gitkeep
Normal file
6
doc/DESCRIPTION.md
Normal file
6
doc/DESCRIPTION.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
Archivist is an automatic backup system for your server.
|
||||||
|
It able to makes backups of your YunoHost core and your apps by using the YunoHost backup command.
|
||||||
|
It can also makes backups of specified directories.
|
||||||
|
Your backups can be send to many other places, local or distant.
|
||||||
|
Archivist is automatically launched periodicaly to update your backups and send the modifications to the other places.
|
||||||
|
|
5
doc/DESCRIPTION_fr.md
Normal file
5
doc/DESCRIPTION_fr.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
Archivist est un système de sauvegarde automatique pour votre serveur.
|
||||||
|
Il est capable de faire des sauvegardes de votre noyau YunoHost et de vos applications en utilisant la commande de backup de YunoHost.
|
||||||
|
Il peut également faire des sauvegardes de répertoires spécifiques.
|
||||||
|
Vos sauvegardes peuvent être envoyées à de nombreux autres endroits, locaux ou distants.
|
||||||
|
Archivist est automatiquement lancé périodiquement pour mettre à jour vos sauvegardes et envoyer les modifications aux autres emplacements.
|
10
doc/DISCLAIMER.md
Normal file
10
doc/DISCLAIMER.md
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
The configuration of archivist can be changed in the file /opt/yunohost/archivist/Backup_list.conf
|
||||||
|
Please read the [documentation](https://github.com/maniackcrudelis/archivist/blob/master/Configuration.md) about the configuration of archivist for more informations.
|
||||||
|
|
||||||
|
## Limitations
|
||||||
|
|
||||||
|
* Encfs, which be used to encrypt the data, is not fully secured.
|
||||||
|
Have a look to the [security audit](https://defuse.ca/audits/encfs.htm) to have more informations.
|
||||||
|
|
10
doc/DISCLAIMER_fr.md
Normal file
10
doc/DISCLAIMER_fr.md
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
La configuration d'archivist peut être modifiée dans le fichier /opt/yunohost/archivist/Backup_list.conf
|
||||||
|
Veuillez lire la [documentation](https://github.com/maniackcrudelis/archivist/blob/master/Configuration_fr.md) sur la configuration d'archivist pour plus d'informations.
|
||||||
|
|
||||||
|
## Limitations
|
||||||
|
|
||||||
|
* Encfs, qui est utilisé pour chiffrer les données, n'est pas parfaitement sécurisé.
|
||||||
|
Consultez l'[audit de sécurité](https://defuse.ca/audits/encfs.htm) pour avoir plus d'informations.
|
||||||
|
|
0
doc/screenshots/.gitkeep
Normal file
0
doc/screenshots/.gitkeep
Normal file
|
@ -6,8 +6,13 @@
|
||||||
"en": "Automatic backups",
|
"en": "Automatic backups",
|
||||||
"fr": "Sauvegardes automatiques"
|
"fr": "Sauvegardes automatiques"
|
||||||
},
|
},
|
||||||
"version": "1.3.1~ynh2",
|
"version": "1.3.2~ynh2",
|
||||||
"url": "https://github.com/maniackcrudelis/archivist",
|
"url": "https://github.com/maniackcrudelis/archivist",
|
||||||
|
"upstream": {
|
||||||
|
"license": "GPL-3.0",
|
||||||
|
"website": "https://github.com/maniackcrudelis/archivist",
|
||||||
|
"code": "https://github.com/maniackcrudelis/archivist"
|
||||||
|
},
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
"name": "",
|
"name": "",
|
||||||
|
|
|
@ -4,8 +4,12 @@
|
||||||
# COMMON VARIABLES
|
# COMMON VARIABLES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Dependencies
|
# dependencies used by the app
|
||||||
app_depencencies="rsync encfs sshpass ccrypt lzop zstd lzip"
|
pkg_dependencies="rsync encfs sshpass ccrypt lzop zstd lzip"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# PERSONAL HELPERS
|
||||||
|
#=================================================
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# EXPERIMENTAL HELPERS
|
# EXPERIMENTAL HELPERS
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
||||||
source ../settings/scripts/_common.sh
|
source ../settings/scripts/_common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
@ -26,7 +27,10 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD BACKUP STEPS
|
# DECLARE DATA AND CONF FILES TO BACKUP
|
||||||
|
#=================================================
|
||||||
|
ynh_print_info --message="Declaring files to be backed up..."
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE APP MAIN DIR
|
# BACKUP THE APP MAIN DIR
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -42,7 +46,7 @@ ynh_backup --src_path="$final_path"
|
||||||
ynh_backup --src_path="/etc/logrotate.d/$app"
|
ynh_backup --src_path="/etc/logrotate.d/$app"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE CRON FILE
|
# BACKUP VARIOUS FILES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/cron.d/$app"
|
ynh_backup --src_path="/etc/cron.d/$app"
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Load common variables for all scripts.
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
@ -65,7 +64,7 @@ ynh_script_progression --message="Installing dependencies..." --weight=15
|
||||||
# To find this, install the package, install also debconf-utils
|
# To find this, install the package, install also debconf-utils
|
||||||
# Then use `debconf-get-selections | grep package`
|
# Then use `debconf-get-selections | grep package`
|
||||||
echo "encfs encfs/security-information boolean true" | debconf-set-selections
|
echo "encfs encfs/security-information boolean true" | debconf-set-selections
|
||||||
ynh_install_app_dependencies $app_depencencies
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
|
@ -160,8 +159,6 @@ ynh_replace_string --match_string="__FREQUENCY__" --replace_string="$cron_freq"
|
||||||
# Calculate and store the config file checksum into the app settings
|
# Calculate and store the config file checksum into the app settings
|
||||||
ynh_store_file_checksum --file="/etc/cron.d/$app"
|
ynh_store_file_checksum --file="/etc/cron.d/$app"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC FINALIZATION
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SECURE FILES AND DIRECTORIES
|
# SECURE FILES AND DIRECTORIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -169,6 +166,8 @@ ynh_store_file_checksum --file="/etc/cron.d/$app"
|
||||||
# Set permissions to app files
|
# Set permissions to app files
|
||||||
chown -R root: $final_path
|
chown -R root: $final_path
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP LOGROTATE
|
# SETUP LOGROTATE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -21,12 +21,12 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD REMOVE
|
# STANDARD REMOVE
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE DEPENDENCIES
|
# REMOVE LOGROTATE CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Removing dependencies..." --weight=7
|
ynh_script_progression --message="Removing logrotate configuration..."
|
||||||
|
|
||||||
# Remove metapackage and its dependencies
|
# Remove the app-specific logrotate config
|
||||||
ynh_remove_app_dependencies
|
ynh_remove_logrotate
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE APP MAIN DIR
|
# REMOVE APP MAIN DIR
|
||||||
|
@ -37,18 +37,19 @@ ynh_script_progression --message="Removing app main directory..."
|
||||||
ynh_secure_remove --file="$final_path"
|
ynh_secure_remove --file="$final_path"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE LOGROTATE CONFIGURATION
|
# REMOVE DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Removing logrotate configuration..."
|
ynh_script_progression --message="Removing dependencies..." --weight=7
|
||||||
|
|
||||||
# Remove the app-specific logrotate config
|
# Remove metapackage and its dependencies
|
||||||
ynh_remove_logrotate
|
ynh_remove_app_dependencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC REMOVE
|
# SPECIFIC REMOVE
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE THE CRON FILE
|
# REMOVE VARIOUS FILES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Removing various files..."
|
||||||
|
|
||||||
# Remove a cron file
|
# Remove a cron file
|
||||||
ynh_secure_remove --file="/etc/cron.d/$app"
|
ynh_secure_remove --file="/etc/cron.d/$app"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Load common variables for all scripts.
|
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
||||||
source ../settings/scripts/_common.sh
|
source ../settings/scripts/_common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ ynh_abort_if_errors
|
||||||
#=================================================
|
#=================================================
|
||||||
# LOAD SETTINGS
|
# LOAD SETTINGS
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Loading settings..."
|
ynh_script_progression --message="Loading installation settings..."
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
|
@ -31,7 +31,8 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Validating restoration parameters..."
|
ynh_script_progression --message="Validating restoration parameters..."
|
||||||
|
|
||||||
test ! -d $final_path || ynh_die --message="There is already a directory: $final_path "
|
test ! -d $final_path \
|
||||||
|
|| ynh_die --message="There is already a directory: $final_path "
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD RESTORATION STEPS
|
# STANDARD RESTORATION STEPS
|
||||||
|
@ -53,27 +54,25 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=17
|
||||||
# To find this, install the package, install also debconf-utils
|
# To find this, install the package, install also debconf-utils
|
||||||
# Then use `debconf-get-selections | grep package`
|
# Then use `debconf-get-selections | grep package`
|
||||||
echo "encfs encfs/security-information boolean true" | debconf-set-selections
|
echo "encfs encfs/security-information boolean true" | debconf-set-selections
|
||||||
ynh_install_app_dependencies $app_depencencies
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# RESTORE VARIOUS FILES
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Restoring various files..."
|
||||||
|
|
||||||
|
ynh_restore_file --origin_path="/etc/cron.d/$app"
|
||||||
|
|
||||||
|
mkdir -p "/home/yunohost.app/${app}/backup"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE THE LOGROTATE CONFIGURATION
|
# RESTORE THE LOGROTATE CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Restoring the logrotate configuration..."
|
||||||
|
|
||||||
mkdir -p /var/log/$app
|
mkdir -p /var/log/$app
|
||||||
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RESTORE THE CRON FILE
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/cron.d/$app"
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RECREATE DIRECTORIES
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
mkdir -p "/home/yunohost.app/${app}/backup"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SEND A README FOR THE ADMIN
|
# SEND A README FOR THE ADMIN
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Load common variables for all scripts.
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
@ -27,6 +26,7 @@ overwrite_cron=$(ynh_app_setting_get --app=$app --key=overwrite_cron)
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK VERSION
|
# CHECK VERSION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Checking version..."
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
upgrade_type=$(ynh_check_app_version_changed)
|
||||||
|
|
||||||
|
@ -38,12 +38,14 @@ ynh_script_progression --message="Backing up the app before upgrading (may take
|
||||||
# Backup the current version of the app
|
# Backup the current version of the app
|
||||||
ynh_backup_before_upgrade
|
ynh_backup_before_upgrade
|
||||||
ynh_clean_setup () {
|
ynh_clean_setup () {
|
||||||
# restore it if the upgrade fails
|
# Restore it if the upgrade fails
|
||||||
ynh_restore_upgradebackup
|
ynh_restore_upgradebackup
|
||||||
}
|
}
|
||||||
# Exit if an error occurs during the execution of the script
|
# Exit if an error occurs during the execution of the script
|
||||||
ynh_abort_if_errors
|
ynh_abort_if_errors
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# STANDARD UPGRADE STEPS
|
||||||
#=================================================
|
#=================================================
|
||||||
# ENSURE DOWNWARD COMPATIBILITY
|
# ENSURE DOWNWARD COMPATIBILITY
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -85,8 +87,6 @@ if [ -z "$admin_mail_html" ]; then
|
||||||
ynh_app_setting_set --app=$app --key=admin_mail_html --value=$admin_mail_html
|
ynh_app_setting_set --app=$app --key=admin_mail_html --value=$admin_mail_html
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# STANDARD UPGRADE STEPS
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -94,6 +94,7 @@ fi
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=2
|
ynh_script_progression --message="Upgrading source files..." --weight=2
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$final_path"
|
ynh_setup_source --dest_dir="$final_path"
|
||||||
fi
|
fi
|
||||||
|
@ -103,7 +104,7 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading dependencies..." --weight=8
|
ynh_script_progression --message="Upgrading dependencies..." --weight=8
|
||||||
|
|
||||||
ynh_install_app_dependencies $app_depencencies
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC UPGRADE
|
# SPECIFIC UPGRADE
|
||||||
|
@ -143,6 +144,15 @@ then
|
||||||
ynh_store_file_checksum --file="/etc/cron.d/$app"
|
ynh_store_file_checksum --file="/etc/cron.d/$app"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# SECURE FILES AND DIRECTORIES
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# Set permissions on app files
|
||||||
|
chown -R root: $final_path
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP LOGROTATE
|
# SETUP LOGROTATE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -151,15 +161,6 @@ ynh_script_progression --message="Upgrading logrotate configuration..."
|
||||||
# Use logrotate to manage app-specific logfile(s)
|
# Use logrotate to manage app-specific logfile(s)
|
||||||
ynh_use_logrotate --non-append
|
ynh_use_logrotate --non-append
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# GENERIC FINALIZATION
|
|
||||||
#=================================================
|
|
||||||
# SECURE FILES AND DIRECTORIES
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
# Set permissions on app files
|
|
||||||
chown -R root: $final_path
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SEND A README FOR THE ADMIN
|
# SEND A README FOR THE ADMIN
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue