mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Update documentation for ynh_add/del_swap
This commit is contained in:
parent
beff899e5f
commit
f005a11a0d
1 changed files with 11 additions and 3 deletions
|
@ -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 ]
|
||||||
|
|
Loading…
Add table
Reference in a new issue