-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
The file /etc/autosleep.d/autosleep.conf
contains al the configuration for the application. The configuration is almost a strict subset of autosuspend's.
The default config file is commented to demo and explain options.
Importantly, you can change where the app logs to (a file, stdout or the systemd journal), or disable logging, by changing the log_target
value.
The interval
value specifies how often to perform activity checks. Decreasing this value will increase the resolution of the data that autosleep will get by checking for activity more often, at the cost of the slight performance hit of running the checks. In most cases, this is neglible, but adjust to your liking.
The program will never suspend your system while you are using it, as long as your checks are configured to detect your definition of usage!
Currently 2 types of activity checks are implemented: Users
and Command
.
Users
checks can be added by adding a section to the config file and specifying class = Users
. The names
, terminals
and hosts
are comma seperated values that will be regex matched, so using ".*"
will match any. Only names
is required, the other fields will default to ".*"
.
Command
checks will run a command (or shell script) and act on its return value; if the command/script returns a 0 exit code, it will be interpreted as the system is active, with non-zero exit codes indicating the system is inactive. Using this, you can implement your own check as a bash script, put it in the /etc/autosleep.d/checks
directory, add it to the config file and voilà.