From 8daed3ddef1e9f6eb89611ad99fa916161eaa5d1 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 19 Sep 2020 16:09:37 +0200 Subject: [PATCH] cleaning up --- conf/settings.yml | 911 --------------------------------------------- scripts/backup | 12 +- scripts/change_url | 14 +- scripts/remove | 4 +- scripts/restore | 2 +- scripts/upgrade | 26 +- 6 files changed, 20 insertions(+), 949 deletions(-) delete mode 100644 conf/settings.yml diff --git a/conf/settings.yml b/conf/settings.yml deleted file mode 100644 index 8df151b..0000000 --- a/conf/settings.yml +++ /dev/null @@ -1,911 +0,0 @@ -general: - debug : False # Debug mode, only for development - instance_name : "searx" # displayed name - -search: - safe_search : 0 # Filter results. 0: None, 1: Moderate, 2: Strict - autocomplete : "" # Existing autocomplete backends: "dbpedia", "duckduckgo", "google", "startpage", "swisscows", "qwant", "wikipedia" - leave blank to turn it off by default - default_lang : "" # Default search language - leave blank to detect from browser information or use codes from 'languages.py' - ban_time_on_fail : 5 # ban time in seconds after engine errors - max_ban_time_on_fail : 120 # max ban time in seconds after engine errors - -server: - port : 8888 - bind_address : "127.0.0.1" # address to listen on - secret_key : "ultrasecretkey" # change this! - base_url : False # Set custom base_url. Possible values: False or "https://your.custom.host/location/" - image_proxy : False # Proxying image results through searx - http_protocol_version : "1.0" # 1.0 and 1.1 are supported - -ui: - static_path : "" # Custom static path - leave it blank if you didn't change - templates_path : "" # Custom templates path - leave it blank if you didn't change - default_theme : oscar # ui theme - default_locale : "" # Default interface locale - leave blank to detect from browser information or use codes from the 'locales' config section - theme_args : - oscar_style : logicodev # default style of oscar -# categories_order : -# - general -# - files -# - map -# - it -# - science - -# searx supports result proxification using an external service: https://github.com/asciimoo/morty -# uncomment below section if you have running morty proxy -# the key is base64 encoded (keep the !!binary notation) -# Note: since commit af77ec3, morty accepts a base64 encoded key. -#result_proxy: -# url : http://127.0.0.1:3000/ -# key : !!binary "your_morty_proxy_key" - -outgoing: # communication with search engines - request_timeout : 2.0 # default timeout in seconds, can be override by engine - # max_request_timeout: 10.0 # the maximum timeout in seconds - useragent_suffix : "" # suffix of searx_useragent, could contain informations like an email address to the administrator - pool_connections : 100 # Number of different hosts - pool_maxsize : 10 # Number of simultaneous requests by host -# uncomment below section if you want to use a proxy -# see http://docs.python-requests.org/en/latest/user/advanced/#proxies -# SOCKS proxies are also supported: see http://requests.readthedocs.io/en/master/user/advanced/#socks -# proxies : -# http : http://127.0.0.1:8080 -# https: http://127.0.0.1:8080 -# uncomment below section only if you have more than one network interface -# which can be the source of outgoing search requests -# source_ips: -# - 1.1.1.1 -# - 1.1.1.2 - -engines: - - name: apk mirror - engine: apkmirror - timeout: 4.0 - shortcut: apkm - disabled: True - - - name : arch linux wiki - engine : archlinux - shortcut : al - - - name : archive is - engine : xpath - search_url : https://archive.is/{query} - url_xpath : (//div[@class="TEXT-BLOCK"]/a)/@href - title_xpath : (//div[@class="TEXT-BLOCK"]/a) - content_xpath : //div[@class="TEXT-BLOCK"]/ul/li - categories : general - timeout : 7.0 - disabled : True - shortcut : ai - - - name : arxiv - engine : arxiv - shortcut : arx - categories : science - timeout : 4.0 - -# tmp suspended: dh key too small -# - name : base -# engine : base -# shortcut : bs - - - name : wikipedia - engine : wikipedia - shortcut : wp - base_url : 'https://{language}.wikipedia.org/' - - - name : bing - engine : bing - shortcut : bi - - - name : bing images - engine : bing_images - shortcut : bii - - - name : bing news - engine : bing_news - shortcut : bin - - - name : bing videos - engine : bing_videos - shortcut : biv - - - name : bitbucket - engine : xpath - paging : True - search_url : https://bitbucket.org/repo/all/{pageno}?name={query} - url_xpath : //article[@class="repo-summary"]//a[@class="repo-link"]/@href - title_xpath : //article[@class="repo-summary"]//a[@class="repo-link"] - content_xpath : //article[@class="repo-summary"]/p - categories : it - timeout : 4.0 - disabled : True - shortcut : bb - - - name : btdigg - engine : btdigg - shortcut : bt - - - name : ccc-tv - engine : xpath - paging : False - search_url : https://media.ccc.de/search/?q={query} - url_xpath : //div[@class="caption"]/h3/a/@href - title_xpath : //div[@class="caption"]/h3/a/text() - content_xpath : //div[@class="caption"]/h4/@title - categories : videos - disabled : True - shortcut : c3tv - - - name : crossref - engine : json_engine - paging : True - search_url : https://search.crossref.org/dois?q={query}&page={pageno} - url_query : doi - title_query : title - content_query : fullCitation - categories : science - shortcut : cr - - - name : currency - engine : currency_convert - categories : general - shortcut : cc - - - name : deezer - engine : deezer - shortcut : dz - - - name : deviantart - engine : deviantart - shortcut : da - timeout: 3.0 - - - name : ddg definitions - engine : duckduckgo_definitions - shortcut : ddd - weight : 2 - disabled : True - -# cloudflare protected -# - name : digbt -# engine : digbt -# shortcut : dbt -# timeout : 6.0 -# disabled : True - - - name : digg - engine : digg - shortcut : dg - - - name : erowid - engine : xpath - paging : True - first_page_num : 0 - page_size : 30 - search_url : https://www.erowid.org/search.php?q={query}&s={pageno} - url_xpath : //dl[@class="results-list"]/dt[@class="result-title"]/a/@href - title_xpath : //dl[@class="results-list"]/dt[@class="result-title"]/a/text() - content_xpath : //dl[@class="results-list"]/dd[@class="result-details"] - categories : general - shortcut : ew - disabled : True - - - name : wikidata - engine : wikidata - shortcut : wd - timeout : 3.0 - weight : 2 - - - name : duckduckgo - engine : duckduckgo - shortcut : ddg - disabled : True - - - name : duckduckgo images - engine : duckduckgo_images - shortcut : ddi - timeout: 3.0 - disabled : True - - - name : etools - engine : etools - shortcut : eto - disabled : True - - - name : etymonline - engine : xpath - paging : True - search_url : https://etymonline.com/search?page={pageno}&q={query} - url_xpath : //a[contains(@class, "word__name--")]/@href - title_xpath : //a[contains(@class, "word__name--")] - content_xpath : //section[contains(@class, "word__defination")] - first_page_num : 1 - shortcut : et - disabled : True - - - name : 1x - engine : www1x - shortcut : 1x - disabled : True - - - name : fdroid - engine : fdroid - shortcut : fd - disabled : True - - - name : flickr - categories : images - shortcut : fl -# You can use the engine using the official stable API, but you need an API key -# See : https://www.flickr.com/services/apps/create/ -# engine : flickr -# api_key: 'apikey' # required! -# Or you can use the html non-stable engine, activated by default - engine : flickr_noapi - - - name : free software directory - engine : mediawiki - shortcut : fsd - categories : it - base_url : https://directory.fsf.org/ - number_of_results : 5 -# what part of a page matches the query string: title, text, nearmatch -# title - query matches title, text - query matches the text of page, nearmatch - nearmatch in title - search_type : title - timeout : 5.0 - disabled : True - - - name : frinkiac - engine : frinkiac - shortcut : frk - disabled : True - - - name : genius - engine : genius - shortcut : gen - - - name : gigablast - engine : gigablast - shortcut : gb - timeout : 3.0 - disabled: True - - - name : gentoo - engine : gentoo - shortcut : ge - - - name : gitlab - engine : json_engine - paging : True - search_url : https://gitlab.com/api/v4/projects?search={query}&page={pageno} - url_query : web_url - title_query : name_with_namespace - content_query : description - page_size : 20 - categories : it - shortcut : gl - timeout : 10.0 - disabled : True - - - name : github - engine : github - 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 : google videos - engine : google_videos - shortcut : gov - - - name : google scholar - engine : xpath - paging : True - search_url : https://scholar.google.com/scholar?start={pageno}&q={query}&hl=en&as_sdt=0,5&as_vis=1 - results_xpath : //div[contains(@class, "gs_r")]/div[@class="gs_ri"] - url_xpath : .//h3/a/@href - title_xpath : .//h3/a - content_xpath : .//div[@class="gs_rs"] - suggestion_xpath : //div[@id="gs_res_ccl_top"]//a/b - page_size : 10 - first_page_num : 0 - categories : science - shortcut : gos - - - name : google play apps - engine : xpath - search_url : https://play.google.com/store/search?q={query}&c=apps - results_xpath : '//div[@class="WHE7ib mpg5gc"]' - title_xpath : './/div[@class="RZEgze"]//div[@title and not(@title="")]/a' - url_xpath : './/div[@class="RZEgze"]//div[@title and not(@title="")]/a/@href' - content_xpath : './/div[@class="RZEgze"]//a[@class="mnKHRc"]' - thumbnail_xpath : './/div[@class="uzcko"]/div/span[1]//img/@data-src' - categories : files - shortcut : gpa - disabled : True - - - name : google play movies - engine : xpath - search_url : https://play.google.com/store/search?q={query}&c=movies - results_xpath : '//div[@class="WHE7ib mpg5gc"]' - title_xpath : './/div[@class="RZEgze"]//div[@title and not(@title="")]/a' - url_xpath : './/div[@class="RZEgze"]//div[@title and not(@title="")]/a/@href' - content_xpath : './/div[@class="RZEgze"]//a[@class="mnKHRc"]' - thumbnail_xpath : './/div[@class="uzcko"]/div/span[1]//img/@data-src' - categories : videos - shortcut : gpm - disabled : True - - - name : google play music - engine : xpath - search_url : https://play.google.com/store/search?q={query}&c=music - results_xpath : '//div[@class="WHE7ib mpg5gc"]' - title_xpath : './/div[@class="RZEgze"]//div[@title and not(@title="")]/a' - url_xpath : './/div[@class="RZEgze"]//div[@title and not(@title="")]/a/@href' - content_xpath : './/div[@class="RZEgze"]//a[@class="mnKHRc"]' - thumbnail_xpath : './/div[@class="uzcko"]/div/span[1]//img/@data-src' - categories : music - shortcut : gps - disabled : True - - - name : geektimes - engine : xpath - paging : True - search_url : https://geektimes.ru/search/page{pageno}/?q={query} - url_xpath : //article[contains(@class, "post")]//a[@class="post__title_link"]/@href - title_xpath : //article[contains(@class, "post")]//a[@class="post__title_link"] - content_xpath : //article[contains(@class, "post")]//div[contains(@class, "post__text")] - categories : it - timeout : 4.0 - disabled : True - shortcut : gt - - - name : habrahabr - engine : xpath - paging : True - search_url : https://habrahabr.ru/search/page{pageno}/?q={query} - url_xpath : //article[contains(@class, "post")]//a[@class="post__title_link"]/@href - title_xpath : //article[contains(@class, "post")]//a[@class="post__title_link"] - content_xpath : //article[contains(@class, "post")]//div[contains(@class, "post__text")] - categories : it - timeout : 4.0 - disabled : True - shortcut : habr - - - name : hoogle - engine : json_engine - paging : True - search_url : https://www.haskell.org/hoogle/?mode=json&hoogle={query}&start={pageno} - results_query : results - url_query : location - title_query : self - content_query : docs - page_size : 20 - categories : it - shortcut : ho - - - name : ina - engine : ina - shortcut : in - timeout : 6.0 - disabled : True - - - name : invidious - engine : invidious - base_url : 'https://invidio.us/' - shortcut: iv - timeout : 5.0 - - - name: kickass - engine : kickass - shortcut : kc - timeout : 4.0 - disabled : True - - - name : library genesis - engine : xpath - search_url : https://libgen.is/search.php?req={query} - url_xpath : //a[contains(@href,"bookfi.net")]/@href - title_xpath : //a[contains(@href,"book/")]/text()[1] - content_xpath : //td/a[1][contains(@href,"=author")]/text() - categories : general - timeout : 7.0 - disabled : True - shortcut : lg - - - name : lobste.rs - engine : xpath - search_url : https://lobste.rs/search?utf8=%E2%9C%93&q={query}&what=stories&order=relevance - results_xpath : //li[contains(@class, "story")] - url_xpath : .//span[@class="link"]/a/@href - title_xpath : .//span[@class="link"]/a - content_xpath : .//a[@class="domain"] - categories : it - shortcut : lo - - - name : microsoft academic - engine : microsoft_academic - categories : science - shortcut : ma - - - name : mixcloud - engine : mixcloud - shortcut : mc - - - name : npm - engine : json_engine - paging : True - search_url : https://api.npms.io/v2/search?q={query}&size=25&from={pageno} - results_query : results - url_query : package/links/npm - title_query : package/name - content_query : package/description - page_size : 25 - categories : it - disabled: True - timeout: 5.0 - shortcut : npm - - - name : nyaa - engine : nyaa - shortcut : nt - disabled : True - - - name : acgsou - engine : acgsou - shortcut : acg - disabled : True - timeout: 5.0 - - - name : openairedatasets - engine : json_engine - paging : True - search_url : https://api.openaire.eu/search/datasets?format=json&page={pageno}&size=10&title={query} - results_query : response/results/result - url_query : metadata/oaf:entity/oaf:result/children/instance/webresource/url/$ - title_query : metadata/oaf:entity/oaf:result/title/$ - content_query : metadata/oaf:entity/oaf:result/description/$ - categories : science - shortcut : oad - timeout: 5.0 - - - name : openairepublications - engine : json_engine - paging : True - search_url : https://api.openaire.eu/search/publications?format=json&page={pageno}&size=10&title={query} - results_query : response/results/result - url_query : metadata/oaf:entity/oaf:result/children/instance/webresource/url/$ - title_query : metadata/oaf:entity/oaf:result/title/$ - content_query : metadata/oaf:entity/oaf:result/description/$ - categories : science - shortcut : oap - timeout: 5.0 - - - name : openstreetmap - engine : openstreetmap - shortcut : osm - - - name : openrepos - engine : xpath - paging : True - search_url : https://openrepos.net/search/node/{query}?page={pageno} - url_xpath : //li[@class="search-result"]//h3[@class="title"]/a/@href - title_xpath : //li[@class="search-result"]//h3[@class="title"]/a - content_xpath : //li[@class="search-result"]//div[@class="search-snippet-info"]//p[@class="search-snippet"] - categories : files - timeout : 4.0 - disabled : True - shortcut : or - - - name : pdbe - engine : pdbe - shortcut : pdb -# Hide obsolete PDB entries. -# Default is not to hide obsolete structures -# hide_obsolete : False - - - name : photon - engine : photon - shortcut : ph - - - name : piratebay - engine : piratebay - shortcut : tpb - url: https://pirateproxy.red/ - timeout : 3.0 - - - name : pubmed - engine : pubmed - shortcut : pub - categories: science - timeout : 3.0 - - - name : qwant - engine : qwant - shortcut : qw - categories : general - disabled : True - - - name : qwant images - engine : qwant - shortcut : qwi - categories : images - - - name : qwant news - engine : qwant - shortcut : qwn - categories : news - - - name : qwant social - engine : qwant - shortcut : qws - categories : social media - - - name : reddit - engine : reddit - shortcut : re - page_size : 25 - timeout : 10.0 - disabled : True - -# tmp suspended: bad certificate -# - name : scanr structures -# shortcut: scs -# engine : scanr_structures -# disabled : True - - - name : soundcloud - engine : soundcloud - shortcut : sc - - - name : stackoverflow - engine : stackoverflow - shortcut : st - - - name : searchcode doc - engine : searchcode_doc - shortcut : scd - - - name : searchcode code - engine : searchcode_code - shortcut : scc - disabled : True - - - name : framalibre - engine : framalibre - shortcut : frl - disabled : True - -# - name : searx -# engine : searx_engine -# shortcut : se -# instance_urls : -# - http://127.0.0.1:8888/ -# - ... -# disabled : True - - - name : semantic scholar - engine : xpath - paging : True - search_url : https://www.semanticscholar.org/search?q={query}&sort=relevance&page={pageno}&ae=false - results_xpath : //article - url_xpath : .//div[@class="search-result-title"]/a/@href - title_xpath : .//div[@class="search-result-title"]/a - content_xpath : .//div[@class="search-result-abstract"] - shortcut : se - categories : science - -# Spotify needs API credentials -# - name : spotify -# engine : spotify -# shortcut : stf -# api_client_id : ******* -# api_client_secret : ******* - - - name : startpage - engine : startpage - shortcut : sp - timeout : 6.0 - disabled : True - - - name : tokyotoshokan - engine : tokyotoshokan - shortcut : tt - timeout : 6.0 - disabled : True - - - name : torrentz - engine : torrentz - shortcut : tor - url: https://torrentz2.eu/ - timeout : 3.0 - - - name : twitter - engine : twitter - shortcut : tw - -# maybe in a fun category -# - name : uncyclopedia -# engine : mediawiki -# shortcut : unc -# base_url : https://uncyclopedia.wikia.com/ -# number_of_results : 5 - -# tmp suspended - too slow, too many errors -# - name : urbandictionary -# engine : xpath -# search_url : http://www.urbandictionary.com/define.php?term={query} -# url_xpath : //*[@class="word"]/@href -# title_xpath : //*[@class="def-header"] -# content_xpath : //*[@class="meaning"] -# shortcut : ud - - - name : unsplash - engine : unsplash - disabled: True - shortcut : us - - - name : yahoo - engine : yahoo - shortcut : yh - disabled : True - - - name : yandex - engine : yandex - shortcut : yn - disabled : True - - - name : yahoo news - engine : yahoo_news - shortcut : yhn - - - name : youtube - shortcut : yt - # You can use the engine using the official stable API, but you need an API key - # See : https://console.developers.google.com/project - # engine : youtube_api - # api_key: 'apikey' # required! - # Or you can use the html non-stable engine, activated by default - engine : youtube_noapi - - - name : dailymotion - engine : dailymotion - shortcut : dm - - - name : vimeo - engine : vimeo - shortcut : vm - - - name : wikibooks - engine : mediawiki - shortcut : wb - categories : general - base_url : "https://{language}.wikibooks.org/" - number_of_results : 5 - search_type : text - disabled : True - - - name : wikinews - engine : mediawiki - shortcut : wn - categories : news - base_url : "https://{language}.wikinews.org/" - number_of_results : 5 - search_type : text - disabled : True - - - name : wikiquote - engine : mediawiki - shortcut : wq - categories : general - base_url : "https://{language}.wikiquote.org/" - number_of_results : 5 - search_type : text - disabled : True - - - name : wikisource - engine : mediawiki - shortcut : ws - categories : general - base_url : "https://{language}.wikisource.org/" - number_of_results : 5 - search_type : text - disabled : True - - - name : wiktionary - engine : mediawiki - shortcut : wt - categories : general - base_url : "https://{language}.wiktionary.org/" - number_of_results : 5 - search_type : text - disabled : True - - - name : wikiversity - engine : mediawiki - shortcut : wv - categories : general - base_url : "https://{language}.wikiversity.org/" - number_of_results : 5 - search_type : text - disabled : True - - - name : wikivoyage - engine : mediawiki - shortcut : wy - categories : general - base_url : "https://{language}.wikivoyage.org/" - number_of_results : 5 - search_type : text - disabled : True - - - name : wolframalpha - shortcut : wa - # You can use the engine using the official stable API, but you need an API key - # See : http://products.wolframalpha.com/api/ - # engine : wolframalpha_api - # api_key: '' # required! - engine : wolframalpha_noapi - timeout: 6.0 - categories : science - - - name : dictzone - engine : dictzone - shortcut : dc - - - name : mymemory translated - engine : translated - shortcut : tl - timeout : 5.0 - disabled : True - # You can use without an API key, but you are limited to 1000 words/day - # See : http://mymemory.translated.net/doc/usagelimits.php - # api_key : '' - - - name : voat - engine: xpath - shortcut: vo - categories: social media - search_url : https://searchvoat.co/?t={query} - url_xpath : //div[@class="entry"]//p[@class="title"]/a/@href - title_xpath : //div[@class="entry"]//p[@class="title"]/a/text() - content_xpath : //div[@class="entry"]//span[@class="domain"]/a/text() - timeout : 10.0 - disabled : True - - - name : 1337x - engine : 1337x - shortcut : 1337x - disabled : True - - - name : duden - engine : duden - shortcut : du - disabled : True - - - name : seznam - shortcut: szn - engine: xpath - paging : True - search_url : https://search.seznam.cz/?q={query}&count=10&from={pageno} - results_xpath: //div[@class="Page-content"]//div[contains(@class, "Result ")] - url_xpath : ./h3/a/@href - title_xpath : ./h3 - content_xpath : .//p[@class="Result-description"] - suggestion_xpath: //div[@class="Related-container"]//div[@class="RelatedItem"]/div/span/a - first_page_num : 0 - page_size : 10 - disabled : True - - - name : mojeek - shortcut: mjk - engine: xpath - paging : True - search_url : https://www.mojeek.com/search?q={query}&s={pageno} - results_xpath: /html/body//div[@class="results"]/ul[@class="results-standard"]/li - url_xpath : ./h2/a/@href - title_xpath : ./h2 - content_xpath : ./p[@class="s"] - suggestion_xpath : /html/body//div[@class="top-info"]/p[@class="top-info spell"]/a - first_page_num : 0 - page_size : 10 - disabled : True - - - name : seedpeer - shortcut : speu - engine : seedpeer - categories: files, music, videos - - - name : rubygems - shortcut: rbg - engine: xpath - paging : True - search_url : https://rubygems.org/search?page={pageno}&query={query} - results_xpath: /html/body/main/div/a[@class="gems__gem"] - url_xpath : ./@href - title_xpath : ./span/h2 - content_xpath : ./span/p - suggestion_xpath : /html/body/main/div/div[@class="search__suggestions"]/p/a - first_page_num : 1 - categories: it - disabled : True - -# - name : yacy -# engine : yacy -# shortcut : ya -# base_url : 'http://localhost:8090' -# number_of_results : 5 -# timeout : 3.0 - -# Doku engine lets you access to any Doku wiki instance: -# A public one or a privete/corporate one. -# - name : ubuntuwiki -# engine : doku -# shortcut : uw -# base_url : 'http://doc.ubuntu-fr.org' - -locales: - en : English - ar : العَرَبِيَّة (Arabic) - bg : Български (Bulgarian) - bo : བོད་སྐད་ (Tibetian) - ca : Català (Catalan) - cs : Čeština (Czech) - cy : Cymraeg (Welsh) - da : Dansk (Danish) - de : Deutsch (German) - el_GR : Ελληνικά (Greek_Greece) - eo : Esperanto (Esperanto) - es : Español (Spanish) - et : Eesti (Estonian) - eu : Euskara (Basque) - fa_IR : (fārsī) فارسى (Persian) - fi : Suomi (Finnish) - fil : Wikang Filipino (Filipino) - fr : Français (French) - gl : Galego (Galician) - he : עברית (Hebrew) - hr : Hrvatski (Croatian) - hu : Magyar (Hungarian) - ia : Interlingua (Interlingua) - it : Italiano (Italian) - ja : 日本語 (Japanese) - lt : Lietuvių (Lithuanian) - nl : Nederlands (Dutch) - nl_BE : Vlaams (Dutch_Belgium) - oc : Lenga D'òc (Occitan) - pl : Polski (Polish) - pt : Português (Portuguese) - pt_BR : Português (Portuguese_Brazil) - ro : Română (Romanian) - ru : Русский (Russian) - sk : Slovenčina (Slovak) - sl : Slovenski (Slovene) - sr : српски (Serbian) - sv : Svenska (Swedish) - te : తెలుగు (telugu) - ta : தமிழ் (Tamil) - tr : Türkçe (Turkish) - uk : українська мова (Ukrainian) - vi : tiếng việt (Vietnamese) - zh : 中文 (Chinese) - zh_TW : 國語 (Taiwanese Mandarin) - -doi_resolvers : - oadoi.org : 'https://oadoi.org/' - doi.org : 'https://doi.org/' - doai.io : 'https://doai.io/' - sci-hub.tw : 'https://sci-hub.tw/' - -default_doi_resolver : 'oadoi.org' diff --git a/scripts/backup b/scripts/backup index c8fcac8..19fd4b5 100755 --- a/scripts/backup +++ b/scripts/backup @@ -19,7 +19,7 @@ ynh_abort_if_errors #================================================= # LOAD SETTINGS #================================================= -ynh_script_progression --message="Loading installation settings..." --weight=2 +ynh_print_info --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME @@ -27,18 +27,19 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= -# STANDARD BACKUP STEPS +# DECLARE DATA AND CONF FILES TO BACKUP +#================================================= +ynh_print_info --message="Declaring files to be backed up..." + #================================================= # BACKUP OF THE MAIN DIR OF THE APP #================================================= -ynh_script_progression --message="Backing up the main app directory..." ynh_backup --src_path="$final_path" #================================================= # BACKUP OF THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Backing up nginx web server configuration..." ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" @@ -47,7 +48,6 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # BACKUP OF THE UWSGI CONFIG #================================================= -ynh_script_progression --message="Backing up uWSGI configuration..." ynh_backup --src_path "/etc/uwsgi/apps-available/$app.ini" ynh_backup --src_path "/var/log/uwsgi/$app" @@ -56,4 +56,4 @@ ynh_backup --src_path "/var/log/uwsgi/$app" # END OF SCRIPT #================================================= -ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --last +ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/change_url b/scripts/change_url index 5ee60b2..01b2a53 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -57,25 +57,25 @@ ynh_systemd_action --service_name=uwsgi --action=stop #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating nginx web server configuration..." --weight=2 +ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2 nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf -# Change the path in the nginx config file +# Change the path in the NGINX config file if [ $change_path -eq 1 ] then - # Make a backup of the original nginx config file if modified + # Make a backup of the original NGINX config file if modified ynh_backup_if_checksum_is_different --file="$nginx_conf_path" - # Set global variables for nginx helper + # Set global variables for NGINX helper domain="$old_domain" path_url="$new_path" path_no_root=${path_url%/} - # Create a dedicated nginx config + # Create a dedicated NGINX config ynh_add_nginx_config "path_no_root" fi -# Change the domain for nginx +# Change the domain for NGINX if [ $change_domain -eq 1 ] then # Delete file checksum for the old conf file location @@ -106,7 +106,7 @@ ynh_systemd_action --service_name=uwsgi-app@$app.service --action=restart --line #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/remove b/scripts/remove index 9b517ff..eaae73a 100644 --- a/scripts/remove +++ b/scripts/remove @@ -47,9 +47,9 @@ ynh_secure_remove --file="$final_path" #================================================= # REMOVE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing nginx web server configuration..." --weight=2 +ynh_script_progression --message="Removing NGINX web server configuration..." --weight=2 -# Remove the dedicated nginx config +# Remove the dedicated NGINX config ynh_remove_nginx_config #================================================= diff --git a/scripts/restore b/scripts/restore index 572af62..35b4eda 100755 --- a/scripts/restore +++ b/scripts/restore @@ -93,7 +93,7 @@ systemctl enable "uwsgi-app@$app.service" #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index ea5b370..2efec62 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -91,22 +91,15 @@ then # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" - - #================================================= - # PATCH VERSION 0.16.0 - #================================================= - - # Apply fix https://github.com/asciimoo/searx/pull/1831 on the current 0.16.0 release. - ynh_replace_string --match_string="werkzeug.contrib.fixers" --replace_string="werkzeug.middleware.proxy_fix" --target_file="$final_path/searx/webapp.py" fi #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading nginx web server configuration..." +ynh_script_progression --message="Upgrading NGINX web server configuration..." path_no_root=${path_url%/} -# Create a dedicated nginx config +# Create a dedicated NGINX config ynh_add_nginx_config "path_no_root" #================================================= @@ -160,7 +153,7 @@ ynh_store_file_checksum --file="$final_path/searx/settings.yml" # SECURING FILES AND DIRECTORIES #================================================= -chown $app: --recursive "$final_path" +chown -R $app: "$final_path" #================================================= # CONFIGURE UWSGI FOR SEARX @@ -180,21 +173,10 @@ ynh_script_progression --message="Restarting Searx..." --weight=3 # Wait for searx to be fully started ynh_systemd_action --service_name=uwsgi-app@$app.service --action=restart --line_match="spawned uWSGI master process" --log_path="/var/log/uwsgi/$app/$app.log" -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Upgrading SSOwat configuration..." - -# Make app public if necessary -if [ $is_public -eq 1 ] -then - ynh_app_setting_set --app=$app --key=skipped_uris --value="/" -fi - #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." +ynh_script_progression --message="Reloading NGINX web server..." ynh_systemd_action --service_name=nginx --action=reload