()
| 111 | } |
| 112 | |
| 113 | func needInit() bool { |
| 114 | file, err := os.OpenFile("/run/1panel_boot_mark", os.O_RDWR|os.O_CREATE|os.O_EXCL, 0644) |
| 115 | if err != nil { |
| 116 | if os.IsExist(err) { |
| 117 | return false |
| 118 | } |
| 119 | global.LOG.Errorf("check boot mark file failed: %v", err) |
| 120 | return true |
| 121 | } |
| 122 | defer file.Close() |
| 123 | fmt.Fprintf(file, "Boot Mark for 1panel\n") |
| 124 | return true |
| 125 | } |
| 126 | |
| 127 | func InitPingStatus() { |
| 128 | global.LOG.Info("initializing ban ping status from settings...") |