HEX
Server: Apache
System: Linux host.hizmetvakfi.org 4.18.0-553.16.1.el8_10.x86_64 #1 SMP Thu Aug 8 07:11:46 EDT 2024 x86_64
User: sinanpasha (1007)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //sbin/imunify-auditd-log-reader-cfg-reload
#!/usr/bin/bash

# This script copies is responsible for install auditd-log-reader configuration file
# received from imunify360 agent.
# It is assumed that imunify360 agent will trigger this script each time new configuration file is deployed.

SRC=/var/imunify360/files/auditd-log-reader/v1/config.yaml
DEST=/etc/imunify360/auditd-log-reader/config.yaml
PIDFILE=/var/run/imunify-auditd-log-reader.pid

mkdir -p dir $(dirname $DEST)
cp -f $SRC $DEST

if [[ ! -e "PIDFILE" ]]; then
  # pid not present, exiting
  exit 0
fi

PID=$(cat $PIDFILE)
if [ -z "${PID//[0-9]}" ]; then
  kill -HUP $PID
fi