This program aims to turn off an inactive TrueNAS instance, within certain hours. You'll be able to setup what hours would you like to check for inactivity, and it will stop the server if it's not running anything. You can run both locally and remote.
It was inspired on Eric Kreuwels's TrueNAS Auto shutdown script, but using the TrueNAS API.
For any of the following sections, you'll need Docker on your machine.
- Go to the
docker
directory and rundocker compose up -d
Note for developers: to try new code, remove the
-d
and add--build
.
If you'd like to run the test, you'll have to run the following command:
- Go to the
src/tests/docker
directory and rundocker compose up --build
If you prefer to install the dependencies locally, follow this steps.
Run python3 -m pip install -r requirements.txt
Run python3 src/__main__.py
. You can specify a custom path for the config file using --config-path <new_path>
.