update README and cosmetics

This commit is contained in:
nikk gitanes
2023-02-02 19:50:45 +03:00
parent 3b7d90d628
commit d1c794e3b7
2 changed files with 25 additions and 15 deletions

View File

@@ -5,9 +5,15 @@ TorrServer, stream torrent to http
Just download server from releases and exec file\ Just download server from releases and exec file\
https://github.com/YouROK/TorrServer/releases \ https://github.com/YouROK/TorrServer/releases \
After open browser link http://127.0.0.1:8090 \ 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*** ***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 #### Unofficial TorrServer iocage plugin
On FreeBSD (TrueNAS/FreeNAS) you can use this plugin On FreeBSD (TrueNAS/FreeNAS) you can use this plugin

View File

@@ -16,7 +16,7 @@ function isRoot() {
function addUser() { function addUser() {
if isRoot; then if isRoot; then
[[ $username == "root" ]] && return 0 [[ $username == "root" ]] && return 0
egrep "^$username" /etc/passwd >/dev/null egrep "^$username" /etc/passwd >/dev/null
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
[[ $lang == "en" ]] && echo " - $username user exists!" || echo " - пользователь $username найден!" [[ $lang == "en" ]] && echo " - $username user exists!" || echo " - пользователь $username найден!"
@@ -35,7 +35,7 @@ function addUser() {
function delUser() { function delUser() {
if isRoot; then if isRoot; then
[[ $username == "root" ]] && return 0 [[ $username == "root" ]] && return 0
egrep "^$username" /etc/passwd >/dev/null egrep "^$username" /etc/passwd >/dev/null
if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
userdel --remove "$username" 2>/dev/null # --force userdel --remove "$username" 2>/dev/null # --force
@@ -204,8 +204,8 @@ function checkArch() {
i686) architecture="386" ;; i686) architecture="386" ;;
x86_64) architecture="amd64" ;; x86_64) architecture="amd64" ;;
aarch64) architecture="arm64" ;; aarch64) architecture="arm64" ;;
armv7|armv7l) architecture="arm7";; armv7|armv7l) architecture="arm7" ;;
armv6|armv6l) architecture="arm5";; armv6|armv6l) architecture="arm5" ;;
*) [[ $lang == "en" ]] && { echo " Unsupported Arch. Can't continue."; exit 1; } || { echo " Не поддерживаемая архитектура. Продолжение невозможно."; exit 1; } ;; *) [[ $lang == "en" ]] && { echo " Unsupported Arch. Can't continue."; exit 1; } || { echo " Не поддерживаемая архитектура. Продолжение невозможно."; exit 1; } ;;
esac esac
} }
@@ -498,16 +498,20 @@ while true; do
echo "" echo ""
[[ $lang == "en" ]] && read -p " Want to install or configure TorrServer? (Yes|No) Type Delete to uninstall. " ydn </dev/tty || read -p " Хотите установить, обновить или настроить TorrServer? (Да|Нет) Для удаления введите «Удалить» " ydn </dev/tty [[ $lang == "en" ]] && read -p " Want to install or configure TorrServer? (Yes|No) Type Delete to uninstall. " ydn </dev/tty || read -p " Хотите установить, обновить или настроить TorrServer? (Да|Нет) Для удаления введите «Удалить» " ydn </dev/tty
case $ydn in case $ydn in
[YyДд]* ) [YyДд]*)
initialCheck; initialCheck
installTorrServer; installTorrServer
break;; break
[DdУу]* ) ;;
uninstall; [DdУу]*)
break;; uninstall
[NnНн]* ) break
break;; ;;
* ) [[ $lang == "en" ]] && echo " Enter Yes, No or Delete" || echo " Ввведите Да, Нет или Удалить" ;; [NnНн]*)
break
;;
*) [[ $lang == "en" ]] && echo " Enter Yes, No or Delete" || echo " Ввведите Да, Нет или Удалить"
;;
esac esac
done done