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

Change searx secret on factory reset

parent c393df06
No related branches found
No related tags found
No related merge requests found
......@@ -75,6 +75,9 @@ fi
if [ -d "/var/lib/tor/hidden_service_webadmin" ]; then
rm -rf "/var/lib/tor/hidden_service_webadmin"
fi
if [ -f "/etc/searx/searx/settings.yml" ]; then
sed -i "s|secret_key :.*|secret_key : \"$(create_random_string 30)\"|g" "/etc/searx/searx/settings.yml"
fi
echo $'Removing installed apps...'
detect_apps
......@@ -202,6 +205,8 @@ if [ -d /var/www/uploads ]; then
rm -rf /var/www/upload/*
fi
systemctl reboot -i
exit 0
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