From acbc8925e4de72a50d813a3f301f545d38a22dc1 Mon Sep 17 00:00:00 2001 From: kam Date: Thu, 29 Jun 2017 21:39:47 +0200 Subject: [PATCH 1/2] clean and start remove script --- scripts/install | 4 ---- scripts/remove | 24 ++++++++---------------- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/scripts/install b/scripts/install index 2fc9dab..99199ba 100644 --- a/scripts/install +++ b/scripts/install @@ -77,10 +77,6 @@ sudo gitlab-ctl reconfigure nginx_conf=../conf/nginx.conf sed -i "s@YNH_WWW_PATH@$path_url@g" $nginx_conf sed -i "s@PORT@$portNginx@g" $nginx_conf -# sed -i "s@YNH_WWW_ALIAS@$src_path/@g" $nginx_conf -# If a dedicated php-fpm process is used: -# Don't forget to modify ../conf/nginx.conf accordingly or your app will not work! -# sed -i "s@YNH_WWW_APP@$app@g" $nginx_conf sudo cp $nginx_conf /etc/nginx/conf.d/$domain.d/$app.conf diff --git a/scripts/remove b/scripts/remove index 754997c..f95cf45 100644 --- a/scripts/remove +++ b/scripts/remove @@ -10,26 +10,18 @@ source /usr/share/yunohost/helpers # Retrieve app settings domain=$(ynh_app_setting_get "$app" domain) -# Remove sources -sudo rm -rf /var/www/$app +sudo apt-get remove gitlab-ce + +# sudo rm -rf /opt/gitlab +# sudo rm -rf /etc/gitlab +# sudo rm -rf /var/opt/gitlab + +# Remove apt sources-list +sudo rm -f /etc/apt/sources.list.d/gitlab-ce.list # Remove nginx configuration file sudo rm -f /etc/nginx/conf.d/$domain.d/$app.conf -### PHP (remove if not used) ### -# If a dedicated php-fpm process is used: -# sudo rm -f /etc/php5/fpm/pool.d/$app.conf -# sudo service php5-fpm reload -### PHP end ### - -### MySQL (remove if not used) ### -# If a MySQL database is used: -# # Drop MySQL database and user -# dbname=$app -# dbuser=$app -# ynh_mysql_drop_db "$dbname" || true -# ynh_mysql_drop_user "$dbuser" || true -### MySQL end ### # Reload nginx service sudo service nginx reload From 8c26fd784798a1b38d37a2e91bd414024a9aab14 Mon Sep 17 00:00:00 2001 From: kam Date: Fri, 30 Jun 2017 09:15:17 +0200 Subject: [PATCH 2/2] remove script --- scripts/remove | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/remove b/scripts/remove index f95cf45..0ec2f65 100644 --- a/scripts/remove +++ b/scripts/remove @@ -12,9 +12,9 @@ domain=$(ynh_app_setting_get "$app" domain) sudo apt-get remove gitlab-ce -# sudo rm -rf /opt/gitlab -# sudo rm -rf /etc/gitlab -# sudo rm -rf /var/opt/gitlab +sudo rm -rf /opt/gitlab +sudo rm -rf /etc/gitlab +sudo rm -rf /var/opt/gitlab # Remove apt sources-list sudo rm -f /etc/apt/sources.list.d/gitlab-ce.list