aboutsummaryrefslogtreecommitdiff
path: root/zabbix/statefile.go
diff options
context:
space:
mode:
Diffstat (limited to 'zabbix/statefile.go')
-rw-r--r--zabbix/statefile.go34
1 files changed, 0 insertions, 34 deletions
diff --git a/zabbix/statefile.go b/zabbix/statefile.go
deleted file mode 100644
index 26ea650..0000000
--- a/zabbix/statefile.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package zabbix
-
-import (
- "fmt"
- "os"
- "path/filepath"
-)
-
-const (
- bareosStateFile = "bareos-fd.9102.state"
- baculaStateFile = "bacula-fd.9102.state"
-)
-
-func checkStateFile() error {
- // Finds the state file to parse
- if stateFileName != "" {
- stateFileName = filepath.Join(workDir, stateFileName)
- info, err := os.Stat(stateFileName)
- if os.IsNotExist(err) || info.IsDir() {
- return fmt.Errorf("The state file %s does not exist", stateFileName)
- }
- } else {
- stateFileName = filepath.Join(workDir, bareosStateFile)
- info, err := os.Stat(stateFileName)
- if os.IsNotExist(err) || info.IsDir() {
- stateFileName = filepath.Join(workDir, baculaStateFile)
- info, err = os.Stat(stateFileName)
- if os.IsNotExist(err) || info.IsDir() {
- return fmt.Errorf("Could not find a suitable state file. Has a job ever run?")
- }
- }
- }
- return nil
-}