From 60da9f637456df746a3a3a9aeb8cc236aafe964b Mon Sep 17 00:00:00 2001 From: Maximilian Thoma Date: Sat, 3 Oct 2020 20:36:51 +0200 Subject: [PATCH] small fixes --- README.md | 2 +- gitea_installer.sh | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 1264db5..a18a16d 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Available flags: wget https://github.com/lanbugs/gitea_installer/raw/main/gitea_installer.sh chmod +x gitea_installer.sh -./gitea_installer.sh -f git.example.com -e admin@example.com -i 10.10.10.10 -p securepassword -r sqlrootpw -l -u +sudo ./gitea_installer.sh -f git.example.com -e admin@example.com -i 10.10.10.10 -p securepassword -r sqlrootpw -l -u ``` Finished screen: diff --git a/gitea_installer.sh b/gitea_installer.sh index e5c5ecf..acae021 100644 --- a/gitea_installer.sh +++ b/gitea_installer.sh @@ -67,24 +67,20 @@ VER=$(curl --silent "https://api.github.com/repos/go-gitea/gitea/releases/latest adduser --system --group --disabled-password --shell /bin/bash --home /home/git --gecos 'Git Version Control' git # Download gitea -# Check if architecure is i386 and download Gitea if [ -n "$(uname -a | grep i386)" ]; then - sudo curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-386" + curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-386" fi -# Check if architecure is x86 and download Gitea if [ -n "$(uname -a | grep x86_64)" ]; then - sudo curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-amd64" + curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-amd64" fi -# Check if architecure is ARMv6 and download Gitea if [ -n "$(uname -a | grep armv6l)" ]; then - sudo curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-arm-6" + curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-arm-6" fi -# Check if architecure is ARMv7 and download Gitea if [ -n "$(uname -a | grep armv7l)" ]; then - sudo curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-arm-7" + curl -fsSL -o "/tmp/gitea" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-arm-7" fi # Move binary