mirror of
https://github.com/searxng/searxng.git
synced 2025-08-31 23:46:49 +02:00
[utils/searxng.sh] implement new script to install SearXNG
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
81bba44869
commit
782f73540e
22 changed files with 1182 additions and 218 deletions
|
@ -19,10 +19,13 @@ A redis DB connect can be tested by::
|
|||
|
||||
"""
|
||||
|
||||
import os
|
||||
import pwd
|
||||
import logging
|
||||
import redis
|
||||
from searx import get_setting
|
||||
|
||||
|
||||
logger = logging.getLogger('searx.shared.redis')
|
||||
_client = None
|
||||
|
||||
|
@ -42,6 +45,7 @@ def init():
|
|||
logger.info("connected redis DB --> %s", c.acl_whoami())
|
||||
return True
|
||||
except redis.exceptions.ConnectionError as exc:
|
||||
logger.error("can't connet redis DB ...")
|
||||
_pw = pwd.getpwuid(os.getuid())
|
||||
logger.error("[%s (%s)] can't connect redis DB ...", _pw.pw_name, _pw.pw_uid)
|
||||
logger.error(" %s", exc)
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue