#!/bin/bash # (C) 2023 kmpr.at # This script updates baremetal installations of searxng # Do not remove copyright if you share this script! /bin/echo "kmpr.at searx-ng updater v1.1" /bin/echo "...kopiere favicon" /bin/su -c "/bin/cp /usr/local/searx/searxng-src/searx/static/themes/simple/img/favicon.png /tmp/favicon.png" searx /bin/echo "...kopiere Logo" /bin/su -c "/bin/cp /usr/local/searx/searxng-src/searx/static/themes/simple/img/searxng.png /tmp/searxng.png" searx /bin/echo "...kopiere Seitentemplate" /bin/su -c "/bin/cp /usr/local/searx/searxng-src/searx/templates/simple/base.html /tmp/base.html" searx /bin/echo "...loesche searx-Verzeichnis" /bin/su -c "/bin/rm -rf /usr/local/searx/searx*" searx /bin/echo "...git clone von searx-Repository" /bin/su -c "/usr/bin/git clone 'https://github.com/searxng/searxng' '/usr/local/searx/searxng-src'" searx /bin/echo "...Python venv" /bin/su -c "/usr/bin/python3 -m venv '/usr/local/searx/searx-pyenv'" searx /bin/su -c "/bin/echo '. /usr/local/searx/searx-pyenv/bin/activate' >> '/usr/local/searx/.profile'" searx /bin/echo "...Python version" /bin/su -c "command -v /usr/local/searx/searx-pyenv/bin/python" searx /bin/su -c "/usr/local/searx/searx-pyenv/bin/python --version" searx /bin/echo "...Installiere via pip" /bin/su -c "/usr/local/searx/searx-pyenv/bin/pip install -U pip setuptools wheel pyyaml" searx /bin/su -c "cd '/usr/local/searx/searxng-src'" searx /bin/su -c "/usr/local/searx/searx-pyenv/bin/pip install -e /usr/local/searx/searxng-src/." searx /bin/echo "...verschiebe temp. Dateien" /bin/su -c "/bin/mv /tmp/favicon.png /usr/local/searx/searxng-src/searx/static/themes/simple/img/favicon.png" searx /bin/su -c "/bin/mv /tmp/searxng.png /usr/local/searx/searxng-src/searx/static/themes/simple/img/searxng.png" searx /bin/su -c "/bin/mv /tmp/base.html /usr/local/searx/searxng-src/searx/templates/simple/base.html" searx /bin/echo "...restarte service" /usr/bin/sudo -H /usr/sbin/service uwsgi restart searxng /bin/echo "FERTIG!"