Skip to content

Configuration

meowxiik edited this page Aug 14, 2019 · 1 revision

Each activity consists of several files, all of them will be described over here

Overview

/etc/overseer/
├── activities
│   └── <activity>.json
├── enabled
│   └── <activity> # Symlink
├── ready
│   └── <activity> # Symlink
├── scripts
│   ├── disable
│   │   └── <activity>
│   ├── enable
│   │   └── <activity>
│   ├── managers 
│   │   └── <activity> # Optional
│   └── checks
│       └── <check> # Optional
├── trackers
│   └── <activity> # Auto generated
└── reverse-trackers
    └── <activity> # Auto generated

Activity Definition

Activity is a .json file in activities. Contains following properties: "Limit", "AutoStart", "AutoStop". Example activities:

{
  "Limit": "40M",
  "AutoStart": "08:20",
  "AutoStop": "09:00"
}
{
  "Limit": "1H"
}

The Limit property is mandatory.

Scripts

scripts/disable/<activity> - Script that is ran when an activity is to be disabled.

scripts/enable/<activity> - Script that is ran when an activity is to be enabled.

scripts/managers/<activity> - Activities that have a manager script will get automatically enabled when manager script returns 0.

Symlinks

When activity is enabled state, there will be a symlink from enabled/<activity> to activities/<activity>.json

When activity is ready state, there will be a symlink from enabled/<activity> to activities/<activity>.json

Trackers

Overseer provides 2 ways of tracking activity limits:

trackers/<activity> - Contains number of seconds an activity spent enabled.

reverse-trackers/<activity> - Contains number of seconds activity has left until limit.