From d1c794e3b72b84ac146e76fb7a0a0e22ee212692 Mon Sep 17 00:00:00 2001 From: nikk gitanes Date: Thu, 2 Feb 2023 19:50:45 +0300 Subject: [PATCH] update README and cosmetics --- README.md | 8 +++++++- installTorrServerLinux.sh | 32 ++++++++++++++++++-------------- 2 files changed, 25 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 3ae3490..d36b4cd 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,15 @@ TorrServer, stream torrent to http Just download server from releases and exec file\ https://github.com/YouROK/TorrServer/releases \ After open browser link http://127.0.0.1:8090 \ -On linux systems you need to set the environment variable before run \ +On linux systems you may need to set the environment variable before run \ ***export GODEBUG=madvdontneed=1*** +#### macOS install / configure / uninstall script +curl -s https://raw.githubusercontent.com/YouROK/TorrServer/master/installTorrServerMac.sh|sudo bash + +#### Linux on VPS install / configure / uninstall script +curl -s https://raw.githubusercontent.com/YouROK/TorrServer/master/installTorrServerLinux.sh|sudo bash + #### Unofficial TorrServer iocage plugin On FreeBSD (TrueNAS/FreeNAS) you can use this plugin diff --git a/installTorrServerLinux.sh b/installTorrServerLinux.sh index cda27d6..c4451f8 100644 --- a/installTorrServerLinux.sh +++ b/installTorrServerLinux.sh @@ -16,7 +16,7 @@ function isRoot() { function addUser() { if isRoot; then - [[ $username == "root" ]] && return 0 + [[ $username == "root" ]] && return 0 egrep "^$username" /etc/passwd >/dev/null if [ $? -eq 0 ]; then [[ $lang == "en" ]] && echo " - $username user exists!" || echo " - пользователь $username найден!" @@ -35,7 +35,7 @@ function addUser() { function delUser() { if isRoot; then - [[ $username == "root" ]] && return 0 + [[ $username == "root" ]] && return 0 egrep "^$username" /etc/passwd >/dev/null if [ $? -eq 0 ]; then userdel --remove "$username" 2>/dev/null # --force @@ -204,8 +204,8 @@ function checkArch() { i686) architecture="386" ;; x86_64) architecture="amd64" ;; aarch64) architecture="arm64" ;; - armv7|armv7l) architecture="arm7";; - armv6|armv6l) architecture="arm5";; + armv7|armv7l) architecture="arm7" ;; + armv6|armv6l) architecture="arm5" ;; *) [[ $lang == "en" ]] && { echo " Unsupported Arch. Can't continue."; exit 1; } || { echo " Не поддерживаемая архитектура. Продолжение невозможно."; exit 1; } ;; esac } @@ -498,16 +498,20 @@ while true; do echo "" [[ $lang == "en" ]] && read -p " Want to install or configure TorrServer? (Yes|No) Type Delete to uninstall. " ydn