diff options
| author | Salamandar <6552989+Salamandar@users.noreply.github.com> | 2024-05-27 14:56:29 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-27 14:56:29 +0200 |
| commit | 8003baea29c5a5679c7475078ef16263e911b116 (patch) | |
| tree | cf5d2bb10ddb7e32b53ba0de888007b6f8341782 /scripts/ynh_add_swap | |
| parent | a75e6726bca8d3b8a076da4164cd7a18ed29d06e (diff) | |
| parent | 7727e250c3c616bc59c311f20ec6d3e7f773d5da (diff) | |
| download | mastodon_ynh-8003baea29c5a5679c7475078ef16263e911b116.tar.gz mastodon_ynh-8003baea29c5a5679c7475078ef16263e911b116.tar.bz2 mastodon_ynh-8003baea29c5a5679c7475078ef16263e911b116.zip | |
Merge pull request #449 from YunoHost-Apps/testing
Testing Packaging v2
Diffstat (limited to 'scripts/ynh_add_swap')
| -rw-r--r-- | scripts/ynh_add_swap | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/ynh_add_swap b/scripts/ynh_add_swap index d7ec44b..aa82c51 100644 --- a/scripts/ynh_add_swap +++ b/scripts/ynh_add_swap @@ -19,6 +19,13 @@ ynh_add_swap () { SD_CARD_CAN_SWAP=${SD_CARD_CAN_SWAP:-0} + # Can't swap inside an LXD + if [ "$(systemd-detect-virt)" == "lxc" ] + then + ynh_print_warn --message="You are inside a LXC container, swap will not be added, but that can cause troubles for the app $app. Please make sure you have more than 2.5G available RAM." + return + fi + # Swap on SD card only if it's is specified if ynh_is_main_device_a_sd_card && [ "$SD_CARD_CAN_SWAP" == "0" ] then |
