1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/borg_ynh.git synced 2024-09-03 18:16:05 +02:00
* [fix] Check process

* [fix] Timers are not supported by yunohost

* [fix] No yuno service to remove

* [fix] Don't fail on missing yuno service
This commit is contained in:
ljf (zamentur) 2018-11-28 21:16:36 +01:00 committed by GitHub
parent d5ae901aac
commit 3471d211d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 7 deletions

View file

@ -6,7 +6,7 @@
"en": "Backup your server with borg.", "en": "Backup your server with borg.",
"fr": "Sauvegarder votre serveur avec borg." "fr": "Sauvegarder votre serveur avec borg."
}, },
"version": "1.0.2", "version": "1.0.3",
"url": "https://borgbackup.readthedocs.io", "url": "https://borgbackup.readthedocs.io",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"maintainer": { "maintainer": {

View file

@ -28,9 +28,8 @@ ynh_remove_backports
#================================================= #=================================================
# REMOVE FILES # REMOVE FILES
#================================================= #=================================================
yunohost service stop $app.timer systemctl stop $app.timer
yunohost service disable $app.timer systemctl disable $app.timer
yunohost service remove $app.timer
ynh_remove_systemd_config ynh_remove_systemd_config
ynh_secure_remove "/etc/systemd/system/$app.timer" ynh_secure_remove "/etc/systemd/system/$app.timer"
ynh_secure_remove "/usr/local/bin/backup-with-$app" ynh_secure_remove "/usr/local/bin/backup-with-$app"

View file

@ -33,6 +33,9 @@ ynh_clean_setup () {
# 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
yunohost service remove $app.timer
systemctl enable $app.timer if grep "borg.timer" /etc/yunohost/services.yml > /dev/null ; then
systemctl start $app.timer yunohost service remove $app.timer
systemctl enable $app.timer
systemctl start $app.timer
fi