mirror of
https://github.com/searxng/searxng.git
synced 2024-11-22 12:10:11 +01:00
[mod] searx, filtron & morty scripts: add 'reinstall all' command
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
4167bf15dc
commit
db6a4d13e7
@ -64,6 +64,7 @@ usage() {
|
|||||||
usage::
|
usage::
|
||||||
$(basename "$0") shell
|
$(basename "$0") shell
|
||||||
$(basename "$0") install [all|user|rules]
|
$(basename "$0") install [all|user|rules]
|
||||||
|
$(basename "$0") reinstall all
|
||||||
$(basename "$0") update [filtron]
|
$(basename "$0") update [filtron]
|
||||||
$(basename "$0") remove [all]
|
$(basename "$0") remove [all]
|
||||||
$(basename "$0") activate [service]
|
$(basename "$0") activate [service]
|
||||||
@ -77,9 +78,12 @@ shell
|
|||||||
start interactive shell from user ${SERVICE_USER}
|
start interactive shell from user ${SERVICE_USER}
|
||||||
install / remove
|
install / remove
|
||||||
:all: complete setup of filtron service
|
:all: complete setup of filtron service
|
||||||
:check: check the filtron installation
|
|
||||||
:user: add/remove service user '$SERVICE_USER' ($SERVICE_HOME)
|
:user: add/remove service user '$SERVICE_USER' ($SERVICE_HOME)
|
||||||
:rules: reinstall filtron rules $FILTRON_RULES
|
:rules: reinstall filtron rules $FILTRON_RULES
|
||||||
|
install
|
||||||
|
:check: check the filtron installation
|
||||||
|
reinstall:
|
||||||
|
:all: runs 'install/remove all'
|
||||||
update filtron
|
update filtron
|
||||||
Update filtron installation ($SERVICE_HOME)
|
Update filtron installation ($SERVICE_HOME)
|
||||||
activate service
|
activate service
|
||||||
@ -133,6 +137,16 @@ main() {
|
|||||||
;;
|
;;
|
||||||
*) usage "$_usage"; exit 42;;
|
*) usage "$_usage"; exit 42;;
|
||||||
esac ;;
|
esac ;;
|
||||||
|
reinstall)
|
||||||
|
rst_title "re-install $SERVICE_NAME" part
|
||||||
|
sudo_or_exit
|
||||||
|
case $2 in
|
||||||
|
all)
|
||||||
|
remove_all
|
||||||
|
install_all
|
||||||
|
;;
|
||||||
|
*) usage "$_usage"; exit 42;;
|
||||||
|
esac ;;
|
||||||
install)
|
install)
|
||||||
rst_title "$SERVICE_NAME" part
|
rst_title "$SERVICE_NAME" part
|
||||||
sudo_or_exit
|
sudo_or_exit
|
||||||
@ -271,6 +285,7 @@ install_check() {
|
|||||||
|
|
||||||
if [[ "${GO_VERSION}" > "$(go_version)" ]]; then
|
if [[ "${GO_VERSION}" > "$(go_version)" ]]; then
|
||||||
warn_msg "golang ($(go_version)) needs to be $GO_VERSION at least"
|
warn_msg "golang ($(go_version)) needs to be $GO_VERSION at least"
|
||||||
|
warn_msg "you need to reinstall $SERVICE_USER --> $0 reinstall all"
|
||||||
else
|
else
|
||||||
info_msg "golang $(go_version) is installed (min needed is: $GO_VERSION)"
|
info_msg "golang $(go_version) is installed (min needed is: $GO_VERSION)"
|
||||||
fi
|
fi
|
||||||
|
@ -49,6 +49,7 @@ usage() {
|
|||||||
usage::
|
usage::
|
||||||
$(basename "$0") shell
|
$(basename "$0") shell
|
||||||
$(basename "$0") install [all|check|user]
|
$(basename "$0") install [all|check|user]
|
||||||
|
$(basename "$0") reinstall all
|
||||||
$(basename "$0") update [morty]
|
$(basename "$0") update [morty]
|
||||||
$(basename "$0") remove [all]
|
$(basename "$0") remove [all]
|
||||||
$(basename "$0") activate [service]
|
$(basename "$0") activate [service]
|
||||||
@ -66,6 +67,8 @@ install / remove
|
|||||||
:user: add/remove service user '$SERVICE_USER' ($SERVICE_HOME)
|
:user: add/remove service user '$SERVICE_USER' ($SERVICE_HOME)
|
||||||
install
|
install
|
||||||
:check: check the morty installation
|
:check: check the morty installation
|
||||||
|
reinstall:
|
||||||
|
:all: runs 'install/remove all'
|
||||||
update morty
|
update morty
|
||||||
Update morty installation ($SERVICE_HOME)
|
Update morty installation ($SERVICE_HOME)
|
||||||
activate service
|
activate service
|
||||||
@ -145,6 +148,16 @@ main() {
|
|||||||
;;
|
;;
|
||||||
*) usage "$_usage"; exit 42;;
|
*) usage "$_usage"; exit 42;;
|
||||||
esac ;;
|
esac ;;
|
||||||
|
reinstall)
|
||||||
|
rst_title "re-install $SERVICE_NAME" part
|
||||||
|
sudo_or_exit
|
||||||
|
case $2 in
|
||||||
|
all)
|
||||||
|
remove_all
|
||||||
|
install_all
|
||||||
|
;;
|
||||||
|
*) usage "$_usage"; exit 42;;
|
||||||
|
esac ;;
|
||||||
install)
|
install)
|
||||||
rst_title "$SERVICE_NAME" part
|
rst_title "$SERVICE_NAME" part
|
||||||
sudo_or_exit
|
sudo_or_exit
|
||||||
@ -286,6 +299,7 @@ install_check() {
|
|||||||
|
|
||||||
if [[ "${GO_VERSION}" > "$(go_version)" ]]; then
|
if [[ "${GO_VERSION}" > "$(go_version)" ]]; then
|
||||||
warn_msg "golang ($(go_version)) needs to be $GO_VERSION at least"
|
warn_msg "golang ($(go_version)) needs to be $GO_VERSION at least"
|
||||||
|
warn_msg "you need to reinstall $SERVICE_USER --> $0 reinstall all"
|
||||||
else
|
else
|
||||||
info_msg "golang $(go_version) is installed (min needed is: $GO_VERSION)"
|
info_msg "golang $(go_version) is installed (min needed is: $GO_VERSION)"
|
||||||
fi
|
fi
|
||||||
|
@ -142,6 +142,7 @@ usage() {
|
|||||||
usage::
|
usage::
|
||||||
$(basename "$0") shell
|
$(basename "$0") shell
|
||||||
$(basename "$0") install [all|check|init-src|dot-config|user|searx-src|pyenv|uwsgi|packages|settings|buildhost]
|
$(basename "$0") install [all|check|init-src|dot-config|user|searx-src|pyenv|uwsgi|packages|settings|buildhost]
|
||||||
|
$(basename "$0") reinstall all
|
||||||
$(basename "$0") update [searx]
|
$(basename "$0") update [searx]
|
||||||
$(basename "$0") remove [all|user|pyenv|searx-src]
|
$(basename "$0") remove [all|user|pyenv|searx-src]
|
||||||
$(basename "$0") activate [service]
|
$(basename "$0") activate [service]
|
||||||
@ -165,6 +166,8 @@ install / remove
|
|||||||
:buildhost: install packages from OS package manager needed by buildhosts
|
:buildhost: install packages from OS package manager needed by buildhosts
|
||||||
install
|
install
|
||||||
:check: check the SearXNG installation
|
:check: check the SearXNG installation
|
||||||
|
reinstall:
|
||||||
|
:all: runs 'install/remove all'
|
||||||
update searx
|
update searx
|
||||||
Update SearXNG installation ($SERVICE_HOME)
|
Update SearXNG installation ($SERVICE_HOME)
|
||||||
activate service
|
activate service
|
||||||
@ -214,6 +217,16 @@ main() {
|
|||||||
;;
|
;;
|
||||||
*) usage "$_usage"; exit 42;;
|
*) usage "$_usage"; exit 42;;
|
||||||
esac ;;
|
esac ;;
|
||||||
|
reinstall)
|
||||||
|
rst_title "re-install $SERVICE_NAME" part
|
||||||
|
sudo_or_exit
|
||||||
|
case $2 in
|
||||||
|
all)
|
||||||
|
remove_all
|
||||||
|
install_all
|
||||||
|
;;
|
||||||
|
*) usage "$_usage"; exit 42;;
|
||||||
|
esac ;;
|
||||||
install)
|
install)
|
||||||
sudo_or_exit
|
sudo_or_exit
|
||||||
case $2 in
|
case $2 in
|
||||||
@ -385,6 +398,7 @@ install_check() {
|
|||||||
|
|
||||||
if uWSGI_app_available 'searx.ini'; then
|
if uWSGI_app_available 'searx.ini'; then
|
||||||
warn_msg "old searx.ini uWSGI app exists"
|
warn_msg "old searx.ini uWSGI app exists"
|
||||||
|
warn_msg "you need to reinstall $SERVICE_USER --> $0 reinstall all"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user