Improving ynh_lxc_snapshot_load

This commit is contained in:
yalh76 2022-10-24 02:05:26 +02:00
parent fc3d11791e
commit 6c0d35f5b9

View file

@ -456,6 +456,8 @@ ynh_lxc_snapshot_load () {
# Manage arguments with getopts
ynh_handle_getopts_args "$@"
if ynh_lxc_snapshot_exists --name="$name" --snapname="$snapname"
then
log_debug "Loading snapshot $snapname ..."
# Remove swap files before restoring the snapshot.
@ -465,6 +467,9 @@ ynh_lxc_snapshot_load () {
lxc restore $name $snapname
_ynh_lxc_start_and_wait --name=$name
else
return 1
fi
}
# Reset an LXC container