HEX
Server: Apache/2
System: Linux ind.multivistaglobal.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: multivis (1002)
PHP: 8.1.32
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //etc/cron.weekly/sa-update
#!/bin/sh
#VERSION=1.6

#Place this into a cron location, such as:
#/etc/cron.weekly/sa-update.sh
#and chmod to 700

LOG=/var/log/sa-update.log
PID=/var/run/spamd.pid

if [ -s ${LOG} ]; then
	if [ -e ${LOG}.2 ]; then
		rm -f ${LOG}.2
	fi
	if [ -e ${LOG}.1 ]; then
		mv -f ${LOG}.1 ${LOG}.2
	fi
	mv -f ${LOG} ${LOG}.1
fi 

/usr/bin/sa-update -D --nogpg --channel updates.spamassassin.org > ${LOG} 2>&1

RET=$?

if [ "$RET" -ge 4 ]; then
	echo "Error updating SpamAssassin Rules. Code=$RET"
	echo ""
	cat $LOG
else
	systemctl stop spamassassin.service >> ${LOG} 2>&1

	if [ -s $PID ]; then
		kill -9 "$(cat $PID)" > /dev/null 2>&1
	else
		pkill -x -9 spamd >/dev/null 2>&1
	fi

	systemctl start spamassassin.service >> ${LOG} 2>&1
fi

if [ "$RET" -eq 1 ]; then
	RET=0
fi

exit $RET