Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
update go1.8 to go1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
codeskyblue committed Feb 26, 2018
1 parent 2efeb48 commit 6d17c80
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
language: go
sudo: false
go:
- 1.8
- 1.10
install:
- go get github.com/shurcooL/vfsgen
- go get -v -t
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ HTTP Server runs on android device

运行再Android手机上的http服务器,旨在希望通过Wifi控制手机,完成手机的自动化功能。

# Build
需要Go版本 >= 1.10

```bash
$ go get -v
$ go generate
$ GOOS=linux GOARCH=arm go build -tags vfs
```

# Usage
<https://github.com/openatx/atx-agent/releases>下载以`linux_armv7.tar.gz`结尾的二进制包。绝大部分手机都是linux-arm架构的。

Expand Down
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -1104,6 +1104,7 @@ func main() {
fmt.Println("Enter into daemon mode")
os.Unsetenv("IGNORE_SIGHUP")

os.Rename("/sdcard/atx-agent.log", "/sdcard/atx-agent.log.old")
f, err := os.Create("/sdcard/atx-agent.log")
if err != nil {
panic(err)
Expand Down Expand Up @@ -1185,7 +1186,7 @@ func main() {
signal.Notify(sigc, syscall.SIGINT, syscall.SIGTERM)
go func() {
for sig := range sigc {
log.Println(sig)
log.Println("receive signal", sig)
service.StopAll()
os.Exit(0)
httpServer.Shutdown(context.TODO())
Expand Down

0 comments on commit 6d17c80

Please sign in to comment.