this post was submitted on 25 Mar 2024
1 points (100.0% liked)

Selfhosted

39503 readers
576 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

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.

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here