diff options
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | autoBackup/autoBackup.py | 4 | ||||
-rw-r--r-- | autoBackup/docker-compose.yml | 6 |
3 files changed, 10 insertions, 5 deletions
@@ -21,3 +21,8 @@ If the Tasmota MQTT plug was already on when the script starts, it implies that be switched off. It is recommended to run ZFS scrub tasks manually occasionally, otherwise they probably won't be run by TrueNAS. + +A Dockerfile is provided so you can automatically run this script as a cronjob. + +The MQTT Tamsmota stuff is pretty specific to my setup so might not be too useful to others; but the TrueNAS API stuff might be useful to other people. It probably wouldn't be too hard to make this work with wake-on-lan instead. We are using the HTTP API instead of the sockets API, since the sockets API seems to change quite a lot. We use standard TrueNAS API keys. + diff --git a/autoBackup/autoBackup.py b/autoBackup/autoBackup.py index 9b5dee5..166ad5a 100644 --- a/autoBackup/autoBackup.py +++ b/autoBackup/autoBackup.py @@ -179,7 +179,7 @@ def main(): if was_already_on: logging.info("The slave TrueNAS was turned on not by us, so stopping here") else: - logging.info("The slave TrueNAS was turned on my us, so starting the shutdown procedure") + logging.info("The slave TrueNAS was turned on by us, so starting the shutdown procedure") logging.info(json.dumps(slave.shutdown(), indent = 4)) # wait until the slave TrueNAS is using 0w of power, which implies it has finished shutting down, @@ -192,4 +192,4 @@ def main(): if __name__ == "__main__": main() -
\ No newline at end of file + diff --git a/autoBackup/docker-compose.yml b/autoBackup/docker-compose.yml index 2f43e77..f23ecb8 100644 --- a/autoBackup/docker-compose.yml +++ b/autoBackup/docker-compose.yml @@ -2,13 +2,13 @@ version: "3" services: autoReplicate: - container_name: autoReplicate + container_name: auto_replicate volumes: - ./logs/:/app/logs env_file: - ./.env restart: unless-stopped - image: reg.reaweb.uk/autoBackup + image: reg.reaweb.uk/auto_replicate build: context: . - dockerfile: Dockerfile
\ No newline at end of file + dockerfile: Dockerfile |