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:
parent
bdcfc5358c
commit
fb852d4bc8
2 changed files with 8 additions and 3 deletions
|
@ -13,7 +13,7 @@
|
|||
"email": "pierre@kayou.io"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.1.3"
|
||||
"yunohost": ">= 4.2.8"
|
||||
},
|
||||
"multi_instance": false,
|
||||
"services": [
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue