Skip to content

Commit

Permalink
优化trojan安装
Browse files Browse the repository at this point in the history
  • Loading branch information
Jrohy committed May 26, 2021
1 parent f23ddd1 commit f82b7a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion trojan/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package trojan
import (
"fmt"
"net"
"runtime"
"strconv"
"strings"
"time"
Expand Down Expand Up @@ -52,7 +53,7 @@ func InstallTrojan() {
fmt.Println()
data := string(asset.GetAsset("trojan-install.sh"))
checkTrojan := util.ExecCommandWithResult("systemctl list-unit-files|grep trojan.service")
if checkTrojan == "" || Type() == "trojan-go" {
if (checkTrojan == "" && runtime.GOARCH != "amd64") || Type() == "trojan-go" {
data = strings.ReplaceAll(data, "TYPE=0", "TYPE=1")
}
util.ExecCommand(data)
Expand Down

0 comments on commit f82b7a7

Please sign in to comment.