#! /bin/sh # Rocky9 compatible # Author: Ričardas Stoma # Company: Kolmisoft # Year: 2015 # About: Script checks if FreeRADIUS and FreeSWITCH are using safe init scripts (safe init scripts allow to catch segfaults and restart services automatically) . /usr/src/m2/framework/bash_functions.sh # check if safe_radius script exists if [ ! -f /usr/local/sbin/safe_radiusd ]; then report "safe_radiusd script not found in the system but will be installed now" 2 # install safe_radiusd script cp -fr /usr/src/m2/freeradius/safe_radiusd /usr/local/sbin/safe_radiusd # also re-install init script if [[ $ROCKY9 != 1 ]]; then cp -fr /usr/src/m2/freeradius/freeradius_init /etc/init.d/radiusd fi else report "safe_radiusd script found in the system" 0 fi # check if safe_freeswitch script exists # if [ ! -f /usr/local/freeswitch/bin/safe_freeswitch ]; then # report "safe_freeswitch script not found in the system but will be installed now" 2 # # # install safe_freeswitch script # cp -fr /usr/src/m2/freeswitch/safe_freeswitch /usr/local/freeswitch/bin/safe_freeswitch # # also re-install init script # cp -fr /usr/src/m2/freeswitch/freeswitch_init /etc/init.d/freeswitch # # else # report "safe_freeswitch script found in the system" 0 # fi