mirror of
https://github.com/YunoHost-Apps/jirafeau_ynh.git
synced 2024-09-03 19:35:53 +02:00
Add --purge option
This commit is contained in:
parent
8275615365
commit
61876c8206
4 changed files with 12 additions and 16 deletions
|
@ -3,4 +3,3 @@ SOURCE_SUM=77bd4b69cb822ac8cac9df6890f17a673c978b10d8dd6fce46b60c763b859f74
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
SOURCE_FILENAME=
|
|
||||||
|
|
|
@ -4,11 +4,6 @@ location __PATH__/ {
|
||||||
# Path to source
|
# Path to source
|
||||||
alias __FINALPATH__/ ;
|
alias __FINALPATH__/ ;
|
||||||
|
|
||||||
# Force usage of https
|
|
||||||
if ($scheme = http) {
|
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
|
||||||
}
|
|
||||||
|
|
||||||
client_max_body_size 10G;
|
client_max_body_size 10G;
|
||||||
client_body_timeout 30m;
|
client_body_timeout 30m;
|
||||||
proxy_read_timeout 30m;
|
proxy_read_timeout 30m;
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
"email": "julien.malik@paraiso.me"
|
"email": "julien.malik@paraiso.me"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.2.4"
|
"yunohost": ">= 4.3.0"
|
||||||
},
|
},
|
||||||
"multi_instance": false,
|
"multi_instance": false,
|
||||||
"services": [
|
"services": [
|
||||||
|
|
|
@ -30,6 +30,17 @@ ynh_script_progression --message="Removing app main directory..." --weight=2
|
||||||
# Remove the app directory securely
|
# Remove the app directory securely
|
||||||
ynh_secure_remove --file="$final_path"
|
ynh_secure_remove --file="$final_path"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# REMOVE DATA DIR
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# Remove the data directory if --purge option is used
|
||||||
|
if [ "${YNH_APP_PURGE:-0}" -eq 1 ]
|
||||||
|
then
|
||||||
|
ynh_script_progression --message="Removing app data directory..." --weight=1
|
||||||
|
ynh_secure_remove --file="$datadir"
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE THE NGINX CONFIGURATION
|
# REMOVE THE NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -53,15 +64,6 @@ ynh_script_progression --message="Removing the cron file..." --weight=1
|
||||||
|
|
||||||
ynh_secure_remove --file="/etc/cron.d/$app"
|
ynh_secure_remove --file="/etc/cron.d/$app"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC REMOVE
|
|
||||||
#=================================================
|
|
||||||
# REMOVE THE DATA DIRECTORY
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Removing data directory..." --weight=1
|
|
||||||
|
|
||||||
ynh_secure_remove --file="$datadir"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALISATION
|
# GENERIC FINALISATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue