Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
csznet committed Mar 26, 2024
1 parent 0a284ed commit 315ab35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/mata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
# - cron: '*/5 * * * *'
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
Expand Down
10 changes: 5 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"csz.net/mata/utils"
)

var Sus bool
var Once bool

func main() {
if conf.Config.Target == "" {
Expand All @@ -26,7 +26,7 @@ func main() {
log.Println(message)
updateDNSRecords(conf.Config.Mata.Then, message)
}
if Sus {
if Once {
return
}
time.Sleep(300 * time.Second)
Expand All @@ -50,9 +50,9 @@ func updateDNSRecords(records []conf.DNSRecord, message string) {
}

func init() {
sus := flag.Bool("sus", false, "Disable Sustain")
once := flag.Bool("once", false, "Run once")
flag.Parse()
if *sus {
Sus = true
if *once {
Once = true
}
}

0 comments on commit 315ab35

Please sign in to comment.