New Entity AI

Draft 1.0:
Index


clean-> systemd.sh



It is assumed that most systems are running systemd in production, but this may not always be the case. There are also clean runners available for traditional sysinit installations, but they are considered legacy. There are also system resource objectives that can be achieved without any generic system control resource. In this case, we're performing a required refresh in systemd at a set interval according to a triggering event.


           

#!/bin/sh
###############################################################################
## COPYRIGHT (C) 2022-2023 NEW ENTITY OPERATIONS INC. ALL RIGHTS RESERVED
## CREATED: 2022/02/15
## INSTANCE: clean/systemd.sh
## MODIFIED: 2023/12/31
## OVERVIEW: perform required refresh tasks in systemd
## HISTORY: VERSION 1.1
## -> 2022/02/15 (VERSION 1.0) Development
## -> 2023/12/31 (VERSION 1.1) Production
###############################################################################
## Add filesystem routines that an be run as a batch below:
## This file sources paths from $dugout_dir/system_paths.dugout
###############################################################################
## Source the wrappers
. "$wrappers_generic"

## ACS CHECK
helper_acs_check "clean"

## clean any never-ending maldetect logs
if [ "$(id -u)" -eq "${SCRIPT_ACS_RUNNER_CLEAN}" ]; then
 printf "%b" "${tmodReset}"
 ## vacuum and destroy the journal, starting with flushing the current journal
 perform_system_action "journalctl" "--flush"
 ## rotate the journal
 perform_system_action "journalctl" "--rotate"
fi