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\
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

View File

@@ -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 </dev/tty || read -p " Хотите установить, обновить или настроить TorrServer? (Да|Нет) Для удаления введите «Удалить» " ydn </dev/tty
case $ydn in
[YyДд]* )
initialCheck;
installTorrServer;
break;;
[DdУу]* )
uninstall;
break;;
[NnНн]* )
break;;
* ) [[ $lang == "en" ]] && echo " Enter Yes, No or Delete" || echo " Ввведите Да, Нет или Удалить" ;;
[YyДд]*)
initialCheck
installTorrServer
break
;;
[DdУу]*)
uninstall
break
;;
[NnНн]*)
break
;;
*) [[ $lang == "en" ]] && echo " Enter Yes, No or Delete" || echo " Ввведите Да, Нет или Удалить"
;;
esac
done