#!/bin/bash # Rocky 9 compatible . /usr/src/m2/framework/bash_functions.sh k_detect_os # ---- VARS ----- VERSION="1.0.3" SCRIPT_NAME="Core 10cc Install" TEST=0 # 1 - do not execute changes # ---- FUNCTIONS ----- # ---- MAIN ----- k_start #k_config_details # core compiled for c7, so only for c7 we will use it. Maybe it works on c6 also. Not tested :( k_detect_os if [[ $centos_version == 7 || $ROCKY9 == 1 ]]; then : else report "This script can only be executed on Centos 7 / R9" 1 k_exit 1 fi if [ ! -f /usr/local/lib/rlm_m2.so ]; then if [[ $ROCKY9 == 1 ]]; then cp -fr /usr/src/m2/core/10cc/r9/rlm_m2.so /usr/local/lib else cp -fr /usr/src/m2/core/10cc/rlm_m2.so /usr/local/lib fi /usr/src/m2/freeradius/radius_restart.sh else report "Core already present" 0 fi k_exit 0