mirror of
https://github.com/YunoHost/package_check.git
synced 2024-09-03 20:06:20 +02:00
Clean swap files
The previous fix was designed for raspi and devices will low space. This new fix is designed to prevent swap files to pile up.
This commit is contained in:
parent
caab800369
commit
e68351ad17
1 changed files with 12 additions and 2 deletions
|
@ -139,6 +139,16 @@ is_lxc_running () {
|
||||||
}
|
}
|
||||||
|
|
||||||
LXC_INIT () {
|
LXC_INIT () {
|
||||||
|
# Clean previous remaining swap files
|
||||||
|
sudo swapoff /var/lib/lxc/$lxc_name/rootfs/swap_* 2>/dev/null
|
||||||
|
sudo rm --force /var/lib/lxc/$lxc_name/rootfs/swap_*
|
||||||
|
sudo swapoff /var/lib/lxcsnaps/$lxc_name/snap0/rootfs/swap_* 2>/dev/null
|
||||||
|
sudo rm --force /var/lib/lxcsnaps/$lxc_name/snap0/rootfs/swap_*
|
||||||
|
sudo swapoff /var/lib/lxcsnaps/$lxc_name/snap1/rootfs/swap_* 2>/dev/null
|
||||||
|
sudo rm --force /var/lib/lxcsnaps/$lxc_name/snap1/rootfs/swap_*
|
||||||
|
sudo swapoff /var/lib/lxcsnaps/$lxc_name/snap2/rootfs/swap_* 2>/dev/null
|
||||||
|
sudo rm --force /var/lib/lxcsnaps/$lxc_name/snap2/rootfs/swap_*
|
||||||
|
|
||||||
# Initialize LXC network
|
# Initialize LXC network
|
||||||
|
|
||||||
# Activate the bridge
|
# Activate the bridge
|
||||||
|
|
Loading…
Add table
Reference in a new issue