Skip to content

This program aims to turn off an inactive TrueNAS instance, within certain hours

License

Notifications You must be signed in to change notification settings

miranda1000/TrueNasPowerManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TrueNAS Power Manager

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.

Instructions with Docker (recommended)

For any of the following sections, you'll need Docker on your machine.

Run

  • Go to the docker directory and run docker compose up -d

Note for developers: to try new code, remove the -d and add --build.

Running the tests

If you'd like to run the test, you'll have to run the following command:

  • Go to the src/tests/docker directory and run docker compose up --build

Instructions for local

If you prefer to install the dependencies locally, follow this steps.

Installing the dependencies

Run python3 -m pip install -r requirements.txt

Run

Run python3 src/__main__.py. You can specify a custom path for the config file using --config-path <new_path>.

About

This program aims to turn off an inactive TrueNAS instance, within certain hours

Resources

License

Stars

Watchers

Forks

Packages

No packages published