mirror of
https://github.com/YunoHost-Apps/restic_ynh.git
synced 2024-09-03 20:16:22 +02:00
Cleanup packagingv2, debug
This commit is contained in:
parent
f27ce2bdd9
commit
bc1b1275c6
4 changed files with 10 additions and 8 deletions
|
@ -67,9 +67,9 @@ ynh_script_progression --message="Adding system configurations related to $app..
|
|||
for suffix in "${systemd_services_suffixes[@]}"; do
|
||||
ynh_add_systemd_config --service="$app$suffix" --template="systemd$suffix.service"
|
||||
_ynh_add_config_j2 --template="systemd$suffix.timer.j2" --destination="/etc/systemd/system/$app$suffix.timer"
|
||||
systemctl disable --quiet "${app}$suffix.service"
|
||||
ynh_systemd_action --service="${app}$suffix.service" --action="disable"
|
||||
systemctl enable --quiet "${app}$suffix.timer"
|
||||
systemctl start --quiet "${app}$suffix.timer"
|
||||
ynh_systemd_action --service="${app}$suffix.timer" --action="start"
|
||||
|
||||
yunohost service add "$app$suffix" --description="Restic backup program ($app$suffix)" \
|
||||
--test_status="systemctl show $app$suffix.service -p ActiveState --value | grep -v failed"
|
||||
|
|
|
@ -18,8 +18,8 @@ for suffix in "${systemd_services_suffixes[@]}"; do
|
|||
if ynh_exec_warn_less yunohost service status "$app_suffix" >/dev/null; then
|
||||
yunohost service remove "$app_suffix"
|
||||
fi
|
||||
systemctl stop "$app$suffix.timer"
|
||||
systemctl --quiet disable "$app$suffix.timer"
|
||||
ynh_systemd_action --service="$app$suffix.timer" --action="stop"
|
||||
ynh_systemd_action --service="$app$suffix.timer" --action="disable"
|
||||
ynh_remove_systemd_config --service="$app$suffix"
|
||||
ynh_secure_remove "/etc/systemd/system/$app$suffix.timer"
|
||||
done
|
||||
|
|
|
@ -13,6 +13,8 @@ source /usr/share/yunohost/helpers
|
|||
#=================================================
|
||||
ynh_script_progression --message="Restoring the app main directory..." --weight=1
|
||||
|
||||
find '/home/yunohost.backup/tmp/Backup_test/apps/restic/backup'
|
||||
|
||||
ynh_restore_file --origin_path="$install_dir"
|
||||
|
||||
ynh_setup_source --source_id=main --dest_dir="$install_dir"
|
||||
|
@ -48,8 +50,8 @@ _set_ssh_config
|
|||
for suffix in "${systemd_services_suffixes[@]}"; do
|
||||
ynh_restore_file --origin_path="/etc/systemd/system/$app$suffix.timer"
|
||||
ynh_restore_file --origin_path="/etc/systemd/system/$app$suffix.service"
|
||||
systemctl enable "$app$suffix.timer"
|
||||
systemctl start "$app$suffix.timer"
|
||||
systemctl enable --quiet "$app$suffix.timer"
|
||||
ynh_systemd_action --service="$app$suffix.timer" --action="start"
|
||||
done
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -37,8 +37,8 @@ ynh_script_progression --message="Stopping $app's systemd service..." --weight=1
|
|||
|
||||
if grep "${app}.timer" /etc/yunohost/services.yml > /dev/null ; then
|
||||
yunohost service remove $app.timer
|
||||
systemctl --quiet enable $app.timer
|
||||
systemctl start $app.timer
|
||||
ynh_systemd_action --service="$app.timer" --action="enable"
|
||||
ynh_systemd_action --service="$app.timer" --action="start"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue