LF_SCRIPT_ACTION
Posted: 03 Jan 2015, 14:39
Hello,
I was just wondering how I can pass the actual contents of the LF_SCRIPT_ALERT to the bash script for LF_SCRIPT_ACTION, example my LF_SCRIPT_ACTION is set to
"/etc/csf/csf.lf_script_perm_action"
which contains
#!/bin/bash
# email subject
SUBJECT="$HOSTNAME - Possible Spam Script"
# Email To
EMAIL="email"
# Email text/message
# EMAILMESSAGE="/tmp/emailmessage.txt"
EMAILMESSAGE="TEST"
echo "info from CSF should go here"> $EMAILMESSAGE
# send an email using /bin/mail
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE
I was just wondering how I can pass the actual contents of the LF_SCRIPT_ALERT to the bash script for LF_SCRIPT_ACTION, example my LF_SCRIPT_ACTION is set to
"/etc/csf/csf.lf_script_perm_action"
which contains
#!/bin/bash
# email subject
SUBJECT="$HOSTNAME - Possible Spam Script"
# Email To
EMAIL="email"
# Email text/message
# EMAILMESSAGE="/tmp/emailmessage.txt"
EMAILMESSAGE="TEST"
echo "info from CSF should go here"> $EMAILMESSAGE
# send an email using /bin/mail
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE