Hello, I installed searxng using git clone and installed all pip packages, but the files are meant for PC environments and aren't suitable for Termux. Let’s take a look at some code from lib.sh:
DIST_ID=$(source /etc/os-release; echo "$ID");
This code obtains an ID from /etc/os-release. However, Termux doesn't have this file in the / directory.
Now, check out this part of the code:
case $DIST_ID-$DIST_VERS in arch-*|fedora-*|centos-7) systemctl enable nginx systemctl start nginx ;; esac
It checks for Arch, Fedora, and CentOS 7, but it never checks for Termux!
Searxng uses sudo, systemctl, and service, all of which require editing the entire file just to replace systemctl with sv from "Termux-services", and removing sudo. It’s just a waste of time. I tried simplifying the process using sed, but I failed. Here's what I attempted:
sed -i -e 's|/usr/local/searxng|/data/data/com.termux/files/home/searxng|g;' searxng.sh
It's also assumed that there’s a / in the directory path. I had to edit the URL in searxng.sh to match the Termux-specific directory, as creating files directly under / isn't possible in Termux.
REDACTED