the-bastion/etc/bastion/osh-lingering-sessions-reaper.conf.dist
2022-02-09 14:31:33 +01:00

50 lines
2 KiB
Text

###############################################################################
## Config for ``bin/cron/osh-lingering-sessions-reaper.sh``
##
## Any file in ``/etc/bastion/osh-lingering-sessions-reaper.conf.d`` will also be
## sourced, in alphabetical order, and take precedence over any
## option specified in this file.
##
## Please ensure this file is owned by root and not world-writable.
##
## As it'll be sourced, THIS FILE MUST BE A VALID SHELL SCRIPT.
##
#@ .. note::
#@
#@ This script is called by cron and is responsible for terminating
#@ lingering sessions that no longer have any tty attached nor parent PID,
#@ and have been running for some time.
###############################################################################
#
# > Logging & activation
# >> Script logging configuration and script activation
#
# LOGFILE (string, path to a file)
# DESC: File where the logs will be written to (don't forget to configure ``logrotate``!).
# Note that using this configuration option, the script will directly write to the file, without using syslog.
# If empty, won't log directly to any file.
# DEFAULT: ""
LOGFILE=""
#
# LOG_FACILITY (string)
# DESC: The syslog facility to use for logging the script output.
# If set to the empty string, we'll not log through syslog at all.
# If this configuration option is missing from your config file altogether,
# the default value will be used (local6), which means that we'll log to syslog.
# DEFAULT: "local6"
LOG_FACILITY="local6"
#
# ENABLED (0 or 1)
# DESC: If set to 1, the script is enabled and will run when started by crond.
# DEFAULT: 1
ENABLED=1
#
# > Main
# >> These options govern the behavior of the script
#
# MAX_AGE (int >= 0)
# DESC: The minimum number of seconds a session must have been opened before
# being considered as possibly a lingering orphan session.
# Still alive sessions, even older than MAX_AGE seconds, will be kept.
# DEFAULT: 86400
MAX_AGE=86400