diff options
| author | anmol26s <github@datamol.org> | 2018-06-21 08:18:02 +0530 |
|---|---|---|
| committer | anmol26s <github@datamol.org> | 2018-06-21 08:18:02 +0530 |
| commit | 9c37e95309833ae19048ee1e53b8c4070f3e7f8d (patch) | |
| tree | e6bf8a8a93ff657baba9203bf52206469c2b076f /scripts/remove | |
| parent | cd1f81fb5d25783329e549ee966a0a545001c63c (diff) | |
| download | mastodon_ynh-9c37e95309833ae19048ee1e53b8c4070f3e7f8d.tar.gz mastodon_ynh-9c37e95309833ae19048ee1e53b8c4070f3e7f8d.tar.bz2 mastodon_ynh-9c37e95309833ae19048ee1e53b8c4070f3e7f8d.zip | |
Improved the app
Diffstat (limited to 'scripts/remove')
| -rw-r--r-- | scripts/remove | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/scripts/remove b/scripts/remove index 0ea12df..b92d3b9 100644 --- a/scripts/remove +++ b/scripts/remove @@ -12,7 +12,6 @@ source /usr/share/yunohost/helpers source _future.sh - #================================================= # LOAD SETTINGS #================================================= @@ -22,11 +21,6 @@ app=$YNH_APP_INSTANCE_NAME # Retrieve app settings domain=$(ynh_app_setting_get "$app" domain) db_name=$(ynh_app_setting_get "$app" db_name) -if [ -z "$db_name" ]; then - db_name="${app}_production" - ynh_app_setting_set "$app" db_name "$db_name" -fi -db_user=$(ynh_sanitize_dbid "$app") final_path=$(ynh_app_setting_get "$app" final_path) #================================================= @@ -67,13 +61,13 @@ fi # Remove metapackage and its dependencies ynh_remove_app_dependencies - +ynh_remove_nodejs #================================================= # REMOVE THE PostgreSQL DATABASE #================================================= # delete postgresql database & user -ynh_psql_remove_db "$db_name" "$db_user" +ynh_psql_remove_db "$db_name" "$app" #================================================= # REMOVE APP MAIN DIR @@ -85,18 +79,12 @@ ynh_secure_remove "$final_path" #================================================= # REMOVE NGINX CONFIGURATION #================================================= - -ynh_secure_remove "/etc/nginx/conf.d/${domain}.d/${app}.conf" -systemctl reload nginx +ynh_remove_nginx_config #================================================= # SPECIFIC REMOVE #================================================= -# REMOVE THE CRON FILE -#================================================= -# Delete cronlog -ynh_secure_remove /etc/cron.d/$app #================================================= # REMOVE source.list @@ -115,5 +103,4 @@ ynh_secure_remove /etc/apt/sources.list.d/yarn.list #================================================= # REMOVE DEDICATED USER #================================================= - -userdel -f $app +ynh_system_user_delete $app |
