[fix] Set base_url in config file. Syntax fix in install script.

This commit is contained in:
opi 2014-07-21 23:26:57 +02:00
parent f7c1a9a310
commit 31a3b28b3a
3 changed files with 8 additions and 168 deletions

View File

@ -3,7 +3,7 @@ server:
secret_key : "ultrasecretkey" # change this!
debug : True
request_timeout : 2.0 # seconds
base_url : False
base_url : ynhbaseurl
engines:
- name : wikipedia

View File

@ -1,156 +0,0 @@
server:
port : 8888
secret_key : "ultrasecretkey" # change this!
debug : True
request_timeout : 2.0 # seconds
base_url : True
engines:
- name : wikipedia
engine : wikipedia
number_of_results : 1
paging : False
shortcut : wp
- name : bing
engine : bing
locale : en-US
shortcut : bi
- name : bing news
engine : bing_news
locale : en-US
shortcut : bin
- name : currency
engine : currency_convert
categories : general
shortcut : cc
- name : deviantart
engine : deviantart
categories : images
shortcut : da
timeout: 3.0
- name : ddg definitions
engine : duckduckgo_definitions
shortcut : ddd
- name : duckduckgo
engine : duckduckgo
locale : en-us
shortcut : ddg
- name : filecrop
engine : filecrop
categories : files
shortcut : fc
- name : flickr
engine : flickr
categories : images
shortcut : fl
timeout: 3.0
- name : github
engine : github
categories : it
shortcut : gh
- name : google
engine : google
shortcut : go
- name : google images
engine : google_images
shortcut : goi
- name : google news
engine : google_news
shortcut : gon
- name : piratebay
engine : piratebay
categories : videos, music, files
shortcut : tpb
- name : soundcloud
engine : soundcloud
categories : music
shortcut : sc
- name : stackoverflow
engine : stackoverflow
categories : it
shortcut : st
- name : startpage
engine : startpage
base_url : 'https://startpage.com/'
search_url : 'https://startpage.com/do/search'
shortcut : sp
# +30% page load time
# - name : ixquick
# engine : startpage
# base_url : 'https://www.ixquick.com/'
# search_url : 'https://www.ixquick.com/do/search'
- name : twitter
engine : twitter
categories : social media
shortcut : tw
# maybe in a fun category
# - name : uncyclopedia
# engine : mediawiki
# categories : general
# shortcut : unc
# url : https://uncyclopedia.wikia.com/
# tmp suspended - too slow, too many errors
# - name : urbandictionary
# engine : xpath
# search_url : http://www.urbandictionary.com/define.php?term={query}
# url_xpath : //div[@class="word"]//a/@href
# title_xpath : //div[@class="word"]//a
# content_xpath : //div[@class="definition"]
# shortcut : ud
- name : yahoo
engine : yahoo
shortcut : yh
- name : yahoo news
engine : yahoo_news
shortcut : yhn
- name : youtube
engine : youtube
categories : videos
shortcut : yt
- name : dailymotion
engine : dailymotion
locale : en_US
categories : videos
shortcut : dm
- name : vimeo
engine : vimeo
categories : videos
results_xpath : //div[@id="browse_content"]/ol/li
url_xpath : ./a/@href
title_xpath : ./a/div[@class="data"]/p[@class="title"]/text()
content_xpath : ./a/img/@src
shortcut : vm
locales:
en : English
de : Deutsch
hu : Magyar
fr : Français
es : Español
it : Italiano
nl : Nederlands

View File

@ -9,7 +9,7 @@ is_public=$3
sudo yunohost app checkurl $domain$path -a searx
sudo yunohost app setting searx skipped_uris -v "$path"
if [[ ! $? -eq 0 ]]; then
exit 1
exit 1
fi
# Check depends installation
@ -23,7 +23,7 @@ then
sudo mkswap /tmp/myswapfile
sudo swapon /tmp/myswapfile
fi
# Init virtualenv
if [ ! -d /opt/searx ];
@ -42,13 +42,9 @@ then
fi
#Configuration Searx
if [ $path != "/" ];
then
sudo cp ../conf/settings.yml-noroot /opt/searx/searx/settings.yml
else
sudo cp ../conf/settings.yml /opt/searx/searx/
fi
sudo cp ../conf/settings.yml /opt/searx/searx/
sudo sed -i -e "s/ultrasecretkey/`openssl rand -hex 16`/g" /opt/searx/searx/settings.yml
sudo sed -i -e "s@ynhbaseurl@https://$domain$path/g" /opt/searx/searx/settings.yml
# Set permissions to searx directory
sudo useradd searx -d /opt/searx
@ -60,7 +56,7 @@ sudo ln -s /etc/uwsgi/apps-available/searx.ini /etc/uwsgi/apps-enabled/
# Modify Nginx configuration file and copy it to Nginx conf directory
sudo sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf*
if [ $path != "/" ];
if [ "$path" != "/" ];
then
sudo cp ../conf/nginx.conf-noroot /etc/nginx/conf.d/$domain.d/searx.conf
else
@ -75,8 +71,8 @@ fi
sudo service nginx reload
sudo service uwsgi restart
if [ $is_public = "Yes" ];
if [ "$is_public" = "Yes" ];
then
sudo yunohost app setting searx skipped_uris -v "/"
sudo yunohost app setting searx skipped_uris -v "/"
fi
sudo yunohost app ssowatconf