Skip to content
Snippets Groups Projects
Commit 06ec000f authored by Bob Mottram's avatar Bob Mottram
Browse files

Function to remove search engine

parent 6c593002
No related branches found
No related tags found
No related merge requests found
......@@ -47,6 +47,7 @@ function remove_irc_server {
iptables -D INPUT -p tcp --dport 1024:65535 --sport $IRC_PORT -j ACCEPT
function_check save_firewall_settings
save_firewall_settings
function_check remove_onion_service
remove_onion_service irc ${IRC_ONION_PORT}
sed -i '/install_irc_server/d' $COMPLETION_FILE
sed -i '/IRC /d' $COMPLETION_FILE
......
......@@ -36,6 +36,27 @@ SEARCH_ENGINE_ONION_HOSTNAME=
SEARCH_ENGINE_LOGIN_TEXT=$"Search engine login"
SEARCH_ENGINE_PASSWORD=
function remove_search_engine {
if ! grep -Fxq "install_search_engine" $COMPLETION_FILE; then
return
fi
systemctl stop searx
systemctl disable searx
rm /etc/systemd/system/searx.service
function_check remove_onion_service
remove_onion_service searx ${SEARCH_ENGINE_ONION_PORT}
userdel -r searx
nginx_dissite searx
if [ -f /etc/nginx/sites-available/searx ]; then
rm /etc/nginx/sites-available/searx
fi
if [ -d ${SEARCH_ENGINE_PATH}/searx ]; then
rm -rf ${SEARCH_ENGINE_PATH}/searx
fi
sed -i '/install_search_engine/d' $COMPLETION_FILE
sed -i '/Search engine /d' $COMPLETION_FILE
}
function install_search_engine {
# Note: currently socks5 outgoing proxies to other search engines does not work
if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment