-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
51 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,5 @@ __debug_bin | |
/toughradius.yml | ||
/tmp/ | ||
/log_info.log | ||
__debug_bin* | ||
__debug_bin* | ||
.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
BuildVersion=latest v8.0.4 2024-01-18 15:23:34 | ||
BuildVersion=latest v8.0.4 2024-01-27 21:39:08 | ||
ReleaseVersion=v8.0.4 | ||
BuildTime=2024-01-18 15:23:34 | ||
BuildTime=2024-01-27 21:39:08 | ||
BuildName=toughradius | ||
CommitID=48ea29e6eddf11ce25e586beee529f51e5b5e85f | ||
CommitDate=Wed, 10 Jan 2024 01:01:19 +0800 | ||
CommitID=b67f7f938db96309ea71963e43aab88b2cc0c4d3 | ||
CommitDate=Sat, 27 Jan 2024 21:37:48 +0800 | ||
CommitUser=jamiesun.net@gmail.com | ||
CommitSubject=2024-01-10 01:01:08 : readme | ||
CommitSubject=add installer.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
|
||
# Check if Golang is installed | ||
if command -v go &> /dev/null | ||
then | ||
# Check that the installed version of Golang is at least 1.21 | ||
GO_VERSION=$(go version | cut -d " " -f3) | ||
MIN_VERSION="go1.21" | ||
|
||
if [[ "$GO_VERSION" < "$MIN_VERSION" ]] | ||
then | ||
echo "Detected Go version $GO_VERSION. Upgrading to Go 1.21.6..." | ||
wget https://go.dev/dl/go1.21.6.linux-amd64.tar.gz | ||
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.21.6.linux-amd64.tar.gz | ||
else | ||
echo "Detected Go version $GO_VERSION. No upgrade needed." | ||
fi | ||
else | ||
echo "Go is not installed. Installing Go 1.21.6..." | ||
wget https://go.dev/dl/go1.21.6.linux-amd64.tar.gz | ||
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.21.6.linux-amd64.tar.gz | ||
fi | ||
|
||
# SET GOROOT AND GOPATH | ||
export GOROOT=/usr/local/go | ||
export GOPATH=$HOME/go | ||
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin | ||
|
||
# Installation ToughRADIUS | ||
echo "Installing ToughRADIUS..." | ||
go install github.com/talkincode/toughradius/v8@latest | ||
|
||
# Execute the ToughRADIUS installation command | ||
echo "Running ToughRADIUS install command..." | ||
toughradius -install | ||
|
||
echo "ToughRADIUS installation completed." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters