mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
[fix] get the current storage of a container instead of using "default"
This commit is contained in:
parent
7c295fa65d
commit
98c00ed402
1 changed files with 2 additions and 1 deletions
|
@ -131,7 +131,8 @@ LXC_RESET () {
|
||||||
|
|
||||||
LXC_STOP $LXC_NAME
|
LXC_STOP $LXC_NAME
|
||||||
|
|
||||||
swapoff "$(lxc storage get default source)/containers/$LXC_NAME/rootfs/swap" 2>/dev/null
|
local current_storage=$(lxc list $LXC_NAME --format json --columns b | jq '.[].expanded_devices.root.pool')
|
||||||
|
swapoff "$(lxc storage get $current_storage source)/containers/$LXC_NAME/rootfs/swap" 2>/dev/null
|
||||||
|
|
||||||
lxc delete $LXC_NAME --force 2>/dev/null
|
lxc delete $LXC_NAME --force 2>/dev/null
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue