From f005a11a0dfbc427bc6fa68b77cc68aa9ccc5275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Fri, 31 May 2024 16:20:54 +0200 Subject: [PATCH] Update documentation for ynh_add/del_swap --- helpers/helpers.v1.d/hardware | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/helpers/helpers.v1.d/hardware b/helpers/helpers.v1.d/hardware index 3183de04c..e00e2d296 100644 --- a/helpers/helpers.v1.d/hardware +++ b/helpers/helpers.v1.d/hardware @@ -104,10 +104,14 @@ ynh_require_ram() { fi } -# Add swap + +# Ask the creation of a swap file for the application. +# The helper might or might not create the swap file, considering the machine's configuration. # -# usage: ynh_add_swap --size=SWAP in MiB -# | arg: -s, --size= - Amount of SWAP to add in MiB. +# [packagingv1] +# +# usage: ynh_add_swap --size=SWAP in Mib +# | arg: -s, --size= - Amount of SWAP to add in Mib. ynh_add_swap () { # Declare an array to define the options of this helper. declare -Ar args_array=( [s]=size= ) @@ -181,6 +185,10 @@ ynh_add_swap () { fi } +# Delete the swap file created for the app by ynh_add_swap. +# +# [packagingv1] +# ynh_del_swap () { # If there a swap at this place if [ -e /swap_file ]