added stop container

This commit is contained in:
2022-10-18 14:14:53 -05:00
parent f4e7273735
commit 808dc294b9
5 changed files with 31 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
import pushover
from json import load
from cclient import c_auth, c_get_containers
from cclient import c_auth, c_get_containers, c_start_container
from clogging import *
import time
import datetime
@@ -14,6 +14,9 @@ class Crn:
self.st = datetime.datetime.now()
with open('./config.json') as c:
self.config = load(c)
with open('./containers.json') as cts:
self.containers = load(cts)
self.observed_containers = self.containers.values()
# Create the api object
self.cc = requests
# Create the logging and pushover objects
@@ -32,6 +35,7 @@ class Crn:
self.username = self.config["username"]
self.password = self.config["password"]
self.endpoint = self.config["endpoint"]
self.start_containers = self.config["start_containers"]
cont_log(self)
cont_notify(self)
self.t = time