File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 1
1
[settings]
2
+ btrfs_enabled =true
3
+ zfs_enabeld =true
2
4
pushover_api_token =abcdefghijklmnopqrstuvwxyz
3
5
pushover_user_key =abcdefghijklmnopqrstuvwxyz
4
6
data_directory =data
Original file line number Diff line number Diff line change @@ -40,7 +40,9 @@ def __init__(self, config):
40
40
self .client = Client (config .get ("settings" , "pushover_user_key" ))
41
41
self .btrfs_mount_points = [path for key , path in config .items ("btrfs_mount_points" )]
42
42
self .data_dir = config .get ("settings" , "data_directory" )
43
- self .suppression_window = int (config .get ("settings" , "suppression_window" ))
43
+ self .suppression_window = config .getint ("settings" , "suppression_window" )
44
+ self .btrfs_enabled = config .getboolean ("settings" , "btrfs_enabled" )
45
+ self .zfs_enabled = config .getboolean ("settings" , "zfs_enabled" )
44
46
45
47
@suppression_window
46
48
def check_btrfs_stats (self ):
@@ -88,9 +90,12 @@ def check_zfs_drives(self):
88
90
self .client .send_message (status , title = "ZFS Array Error" )
89
91
90
92
def run (self ):
91
- self .check_zfs_drives ()
92
- self .check_btrfs_stats ()
93
- self .check_btrfs_drives ()
93
+ if self .zfs_enabled :
94
+ self .check_zfs_drives ()
95
+
96
+ if self .btrfs_enabled :
97
+ self .check_btrfs_stats ()
98
+ self .check_btrfs_drives ()
94
99
95
100
96
101
def main (argv = None ):
You can’t perform that action at this time.
0 commit comments