From 7dc4d9bb71f1e25d0f85eb5c46a49db1fb490da7 Mon Sep 17 00:00:00 2001 From: Martin Rys Date: Mon, 6 May 2024 11:19:59 +0200 Subject: [PATCH] Swap deprecated `egrep` for `grep -E` also remove some extra whitespace in MD doc --- ...stall-latest-Wekan-release-on-Uberspace.md | 28 +++++++++---------- find-replace.sh | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/wekan.wiki/Install-latest-Wekan-release-on-Uberspace.md b/docs/wekan.wiki/Install-latest-Wekan-release-on-Uberspace.md index 15a4a0c46..4bb27e41a 100644 --- a/docs/wekan.wiki/Install-latest-Wekan-release-on-Uberspace.md +++ b/docs/wekan.wiki/Install-latest-Wekan-release-on-Uberspace.md @@ -12,31 +12,31 @@ **Purpose**: Install latest Wekan release on [Uberspace](https://uberspace.de/) 6 and run as [daemontools](https://cr.yp.to/daemontools/faq/create.html) service in local userspace. -This script installs Wekan on a fresh Uberspace 6. It setup Node 4, MongoDB, a Port, installs Wekan and starts it as a service. It's tested with Wekan versions 0.32 and 0.63. +This script installs Wekan on a fresh Uberspace 6. It setup Node 4, MongoDB, a Port, installs Wekan and starts it as a service. It's tested with Wekan versions 0.32 and 0.63. You have two Options to use it. # Option 1: -You can run the commands of the following script step-by-step in the shell. +You can run the commands of the following script step-by-step in the shell. At first step set the SMTP-Password variable. Replace the `$1` with the password in that way `SMTP_PASS="smtp_password"` and continue line-by-line. # Option 2: Or you can run it automatically. * Save it as script in file `install_wekan.sh` -* Make it executable `chmod +x install_wekan.sh` -* And run it. Pass the SMTP-Password as command line parameter `./install_wekan.sh smtp_password`. +* Make it executable `chmod +x install_wekan.sh` +* And run it. Pass the SMTP-Password as command line parameter `./install_wekan.sh smtp_password`. ## ./install_wekan.sh ``` #!/bin/sh -## +## ## Usage: ./install_wekan.sh SMTP-password ## ## Draft ## Install Wekan (v0.63) on Uberspace 6 by Noodle / Chris -## -## Sources: +## +## Sources: ## https://github.com/wekan/wekan/wiki/Install-and-Update#manual-installation-steps ## https://wiki.uberspace.de/database:mongodb ## https://wiki.uberspace.de/development:nodejs @@ -71,8 +71,8 @@ test -d ~/service || uberspace-setup-svscan TEMPMDB="$(uberspace-setup-mongodb)" MONGO_USER="${USER}_mongoadmin" -MONGO_PORT="$(echo ${TEMPMDB} | egrep -o 'm#:\s[0-9]{5}\sUs' | cut -d' ' -f 2)" -MONGO_PASS="$(echo ${TEMPMDB} | egrep -o 'rd:\s.+\sTo\sconn' | cut -d' ' -f 2)" +MONGO_PORT="$(echo ${TEMPMDB} | grep -E -o 'm#:\s[0-9]{5}\sUs' | cut -d' ' -f 2)" +MONGO_PASS="$(echo ${TEMPMDB} | grep -E -o 'rd:\s.+\sTo\sconn' | cut -d' ' -f 2)" echo -e "MONGO_USER: ${MONGO_USER} \nMONGO_PORT: ${MONGO_PORT} \nMONGO_PASS: ${MONGO_PASS}" @@ -81,7 +81,7 @@ echo -e "MONGO_USER: ${MONGO_USER} \nMONGO_PORT: ${MONGO_PORT} \nMONGO_PASS: ${M ### Setup Websocket Port ### ############################ -export FREE_PORT="$(uberspace-add-port --protocol tcp --firewall | egrep -o '[0-9]{5}')" +export FREE_PORT="$(uberspace-add-port --protocol tcp --firewall | grep -E -o '[0-9]{5}')" echo "FREE_PORT: ${FREE_PORT}" @@ -162,14 +162,14 @@ More about [daemontools](https://cr.yp.to/daemontools/faq/create.html). # Uninstall Wekan To remove Wekan from your uberspace you have to do the following steps. -* Stop and remove the service. +* Stop and remove the service. `uberspace-remove-service -s wekan` -* Remove the complete data. +* Remove the complete data. ``` mongo admin --port $MONGO_PORT -u $MONGO_USER -p $MONGO_PASS use wekan db.dropDatabase() exit ``` -* Remove the installation. -`rm -Rf ~/wekan/ ~/etc/wekan-*` \ No newline at end of file +* Remove the installation. +`rm -Rf ~/wekan/ ~/etc/wekan-*` diff --git a/find-replace.sh b/find-replace.sh index 522affab9..d93a1ba0b 100755 --- a/find-replace.sh +++ b/find-replace.sh @@ -2,4 +2,4 @@ # Recursive find/replace. # Syntax: ./find-replace.sh searchtext replacetext -egrep -lRZ '$1' . | xargs -0 -l sed -i -e 's/$1/$2/g' +grep -E -lRZ '$1' . | xargs -0 -l sed -i -e 's/$1/$2/g'