From 3c628cc878c788a91235ab36ee03629d7954f280 Mon Sep 17 00:00:00 2001 From: titoko titoko Date: Sun, 24 Nov 2013 20:51:24 +0100 Subject: [PATCH] add remove script --- scripts/install | 2 +- scripts/remove | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 scripts/remove diff --git a/scripts/install b/scripts/install index 82b2937..71da521 100644 --- a/scripts/install +++ b/scripts/install @@ -38,7 +38,7 @@ sudo mv /tmp/cronttrss /etc/cron.d/ttrss sudo mkdir $final_path/cache/{export,images,upload,js} sudo mkdir $final_path/{feed-icons,lock} -sudo chmod -R 777 cache/images && chmod -R 777 cache/upload && chmod -R 777 cache/export && chmod -R 777 cache/js && chmod -R 777 feed-icons && chmod -R 777 lock +sudo chmod -R 777 $final_path/cache/images && chmod -R 777 $final_path/cache/upload && chmod -R 777 $final_path/cache/export && chmod -R 777 $final_path/cache/js && chmod -R 777 feed-icons && chmod -R 777 lock # Set permissions to ttrss directory diff --git a/scripts/remove b/scripts/remove new file mode 100644 index 0000000..9df2b2c --- /dev/null +++ b/scripts/remove @@ -0,0 +1,10 @@ +#!/bin/bash + +db_user=ttrss +db_name=ttrss +root_pwd=$(sudo cat /etc/yunohost/mysql) +domain=$(sudo yunohost app setting ttrss domain) + +mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user ;" +sudo rm -rf /var/www/ttrss +sudo rm -f /etc/nginx/conf.d/$domain.d/ttrss.conf