mirror of
https://github.com/YunoHost-Apps/restic_ynh.git
synced 2024-09-03 20:16:22 +02:00
Merge branch 'testing'
This commit is contained in:
commit
ea4457de05
3 changed files with 24 additions and 15 deletions
|
@ -6,7 +6,7 @@
|
|||
"en": "Backup your server with restic.",
|
||||
"fr": "Sauvegardez votre serveur avec restic."
|
||||
},
|
||||
"version": "0.12.0~ynh2",
|
||||
"version": "0.12.0~ynh3",
|
||||
"url": "https://restic.net/",
|
||||
"license": "BSD-2-Clause",
|
||||
"maintainer": {
|
||||
|
|
|
@ -19,12 +19,24 @@ ynh_abort_if_errors
|
|||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
export app=$YNH_APP_INSTANCE_NAME
|
||||
export final_path="/opt/yunohost/${app}"
|
||||
|
||||
|
||||
#=================================================
|
||||
# BACKUP FILES
|
||||
#=================================================
|
||||
|
||||
ynh_backup "/usr/local/bin/backup-with-$app"
|
||||
ynh_backup "/etc/systemd/system/$app.service"
|
||||
ynh_backup "/etc/systemd/system/$app.timer"
|
||||
ynh_backup "/etc/systemd/system/${app}_check.service"
|
||||
ynh_backup "/etc/systemd/system/${app}_check.timer"
|
||||
ynh_backup "/etc/systemd/system/${app}_check_read_data.service"
|
||||
ynh_backup "/etc/systemd/system/${app}_check_read_data.timer"
|
||||
ynh_backup "/etc/yunohost/hooks.d/backup_method/05-${app}_app"
|
||||
ynh_backup "${final_path}/check_method_${app}"
|
||||
ynh_backup "${final_path}/restic_log_${app}"
|
||||
ynh_backup "/root/.ssh/id_${app}_ed25519"
|
||||
ynh_backup "/root/.ssh/id_${app}_ed25519.pub"
|
||||
ynh_backup "/root/.ssh/config"
|
||||
|
|
|
@ -20,9 +20,11 @@ ynh_abort_if_errors
|
|||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
export app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
server=$(ynh_app_setting_get $app server)
|
||||
export server=$(ynh_app_setting_get $app server)
|
||||
|
||||
export final_path="/opt/yunohost/${app}"
|
||||
|
||||
#=================================================
|
||||
# INSTALL RESTIC
|
||||
|
@ -43,14 +45,9 @@ ynh_restore
|
|||
#=================================================
|
||||
# ENABLE TIMER
|
||||
#=================================================
|
||||
systemctl --quiet enable $app.timer
|
||||
systemctl start $app.timer
|
||||
#yunohost service add $app.timer
|
||||
#yunohost service enable $app.timer
|
||||
#yunohost service start $app.timer
|
||||
|
||||
#=================================================
|
||||
# RESTORE SYSTEMD
|
||||
#=================================================
|
||||
systemctl --quiet enable $app.service
|
||||
|
||||
systemctl enable --quiet ${app}.timer
|
||||
systemctl enable --quiet ${app}_check.timer
|
||||
systemctl enable --quiet ${app}_check_read_data.timer
|
||||
systemctl start ${app}.timer
|
||||
systemctl start ${app}_check.timer
|
||||
systemctl start ${app}_check_read_data.timer
|
||||
|
|
Loading…
Reference in a new issue