Update documentation for ynh_add/del_swap

This commit is contained in:
Salamandar 2024-05-31 16:20:54 +02:00 committed by Salamandar
parent beff899e5f
commit f005a11a0d

View file

@ -104,10 +104,14 @@ ynh_require_ram() {
fi 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 # [packagingv1]
# | arg: -s, --size= - Amount of SWAP to add in MiB. #
# usage: ynh_add_swap --size=SWAP in Mib
# | arg: -s, --size= - Amount of SWAP to add in Mib.
ynh_add_swap () { ynh_add_swap () {
# Declare an array to define the options of this helper. # Declare an array to define the options of this helper.
declare -Ar args_array=( [s]=size= ) declare -Ar args_array=( [s]=size= )
@ -181,6 +185,10 @@ ynh_add_swap () {
fi fi
} }
# Delete the swap file created for the app by ynh_add_swap.
#
# [packagingv1]
#
ynh_del_swap () { ynh_del_swap () {
# If there a swap at this place # If there a swap at this place
if [ -e /swap_file ] if [ -e /swap_file ]