Function to remove search engine
This commit is contained in:
parent
6c59300271
commit
06ec000f58
|
@ -47,6 +47,7 @@ function remove_irc_server {
|
||||||
iptables -D INPUT -p tcp --dport 1024:65535 --sport $IRC_PORT -j ACCEPT
|
iptables -D INPUT -p tcp --dport 1024:65535 --sport $IRC_PORT -j ACCEPT
|
||||||
function_check save_firewall_settings
|
function_check save_firewall_settings
|
||||||
save_firewall_settings
|
save_firewall_settings
|
||||||
|
function_check remove_onion_service
|
||||||
remove_onion_service irc ${IRC_ONION_PORT}
|
remove_onion_service irc ${IRC_ONION_PORT}
|
||||||
sed -i '/install_irc_server/d' $COMPLETION_FILE
|
sed -i '/install_irc_server/d' $COMPLETION_FILE
|
||||||
sed -i '/IRC /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_LOGIN_TEXT=$"Search engine login"
|
||||||
SEARCH_ENGINE_PASSWORD=
|
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 {
|
function install_search_engine {
|
||||||
# Note: currently socks5 outgoing proxies to other search engines does not work
|
# Note: currently socks5 outgoing proxies to other search engines does not work
|
||||||
if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
|
if [[ $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
|
||||||
|
|
Loading…
Reference in New Issue