Skip to content

Commit

Permalink
list.hancock
Browse files Browse the repository at this point in the history
  • Loading branch information
txthinking committed Nov 22, 2022
1 parent cdbde0a commit 2f0c8f9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
13 changes: 12 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,18 @@ func main() {
return
}
if len(os.Args) == 2 && (os.Args[1] == "version" || os.Args[1] == "-v" || os.Args[1] == "--version") {
fmt.Println("v20221010")
fmt.Println("v20221122")
return
}
if len(os.Args) == 2 && os.Args[1] == "list.hancock" {
b, _ := exec.Command("crontab", "-l").Output()
l := strings.Split(string(b), "\n")
for i, v := range l {
v = strings.TrimSpace(v)
if v != "" {
fmt.Println(strings.Replace(v, "@reboot", strconv.Itoa(i)+"\t", 1))
}
}
return
}
if len(os.Args) == 2 && os.Args[1] == "list" {
Expand Down
3 changes: 1 addition & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

[🗣 News](https://t.me/s/txthinking_news)
[💬 Telegram](https://t.me/brookgroup)
[🩸 Youtube](https://www.youtube.com/txthinking)
[❤️ Sponsor](https://github.com/sponsors/txthinking)
[🩸 Youtube](https://www.youtube.com/txthinking)

Jinbe can add auto start command at boot

Expand Down
3 changes: 1 addition & 2 deletions readme_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

[🗣 News](https://t.me/s/txthinking_news)
[💬 Chat](https://t.me/brookgroup)
[🩸 Youtube](https://www.youtube.com/txthinking)
[❤️ Sponsor](https://github.com/sponsors/txthinking)
[🩸 Youtube](https://www.youtube.com/txthinking)

Jinbe可以添加开机自动启动命令

Expand Down

0 comments on commit 2f0c8f9

Please sign in to comment.