function to remove rss reader
This commit is contained in:
parent
0b6e57e219
commit
e69717af61
|
@ -40,6 +40,23 @@ RSS_READER_PATH=/etc/share/tt-rss
|
|||
RSS_READER_GNUSOCIAL_REPO="https://github.com/bashrc/ttrss-gnusocial"
|
||||
RSS_READER_GNUSOCIAL_COMMIT='8b92b8f5db7b0d12459c7bd86a50f48815efe642'
|
||||
|
||||
function remove_rss_reader {
|
||||
if ! grep -Fxq "install_rss_reader" $COMPLETION_FILE; then
|
||||
return
|
||||
fi
|
||||
nginx_dissite $RSS_READER_DOMAIN_NAME
|
||||
if [ -f /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME ]; then
|
||||
rm /etc/nginx/sites-available/$RSS_READER_DOMAIN_NAME
|
||||
fi
|
||||
if [ -d $RSS_READER_PATH ]; then
|
||||
rm -rf $RSS_READER_PATH
|
||||
fi
|
||||
function_check drop_database
|
||||
drop_database ttrss
|
||||
sed -i '/install_rss_reader/d' $COMPLETION_FILE
|
||||
sed -i '/RSS /d' $COMPLETION_FILE
|
||||
}
|
||||
|
||||
function rss_reader_modifications {
|
||||
# modify the rss reader to use a socks5 proxy rather than a http proxy
|
||||
if [ ! -d $RSS_READER_PATH ]; then
|
||||
|
@ -261,7 +278,7 @@ function install_rss_reader {
|
|||
RSS_READER_ADMIN_PASSWORD_HASH=$(echo -n "${RSS_READER_ADMIN_PASSWORD}" | sha1sum | awk -F ' ' '{print $1}')
|
||||
|
||||
function_check run_query
|
||||
run_query ttrss "update ttrss_users set pwd_hash = 'SHA1:${RSS_READER_ADMIN_PASSWORD_HASH}', salt= '' WHERE login = 'admin';"
|
||||
run_query ttrss "update ttrss_users set pwd_hash = 'SHA1:${RSS_READER_ADMIN_PASSWORD_HASH}', salt= '' WHERE login = 'admin';"
|
||||
|
||||
function_check rss_reader_modifications
|
||||
rss_reader_modifications
|
||||
|
|
Loading…
Reference in New Issue