########################################################################### ## Config for /opt/bastion/bin/cron/osh-remove-empty-folders.sh, the script ## responsible for getting rid of empty folders in the ttyrec/ folder of ## every user (located in their home). This is mainly useful on bastions ## were some type of users (or robots) might connect to a very high number ## of always-changing IPs, hence having folders piling up in their ttyrec/ ## folder, as each IP has its own folder. Of course, this script will only ## remove empty folders, and never remove a single actual file. ## ## Any file in /etc/bastion/osh-remove-empty-folders.conf.d will also be ## sourced, in alphabetical order, and take precedence over any ## option specified in this file. ## ## Please ensure this file is only readable by root. ## ## As it'll be sourced, THIS FILE MUST BE A VALID SHELL SCRIPT. ########################################################################### # # > Logging # >> These options configure the way the script logs its actions # # 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" # # > Script options # >> These options govern the behavior of the script # # ENABLED (0 or 1) # DESC: If set to 1, the script is enabled and will attempt to garbage-collect empty directories located # in /home/*/ttyrec. If set to anything else, the script is considered disabled and will not run. # DEFAULT: 1 ENABLED=1 # # MTIME_DAYS (int, >= 0) # DESC: The amount of days the empty folder must have been empty before considering a removal. You probably # don't need to change the default value, unless you want to ensure that a given folder has not been # used since some time before removing it (this has no impact as folders are re-created as needed). # DEFAULT: 1 MTIME_DAYS=1