1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lxd_ynh.git synced 2024-09-03 19:45:53 +02:00

Add purge option to remove

This commit is contained in:
Kay0u 2021-10-12 13:39:54 +02:00
parent bdcfc5358c
commit fb852d4bc8
No known key found for this signature in database
GPG key ID: AAFEEB16CFA2AE2D
2 changed files with 8 additions and 3 deletions

View file

@ -13,7 +13,7 @@
"email": "pierre@kayou.io"
},
"requirements": {
"yunohost": ">= 4.1.3"
"yunohost": ">= 4.2.8"
},
"multi_instance": false,
"services": [

View file

@ -91,10 +91,15 @@ ynh_script_progression --message="Removing the dedicated system user..."
ynh_system_user_delete --username=$app
#=================================================
# INFO TO REMOVE CONTAINERS
# REMOVE CONTAINERS
#=================================================
ynh_print_warn --message="If you really want to delete all containers and files related to lxd please run \"rm /var/lib/lxd -rf\""
# Remove the data directory if --purge option is used
if [ "${YNH_APP_PURGE:-0}" -eq 1 ]
then
ynh_script_progression --message="Removing containers..."
ynh_secure_remove --file="/var/lib/lxd"
fi
#=================================================
# END OF SCRIPT