Heray-Was-Here
Server : nginx/1.30.2
System : Linux elegant-dhawan.198-71-59-75.plesk.page 5.15.0-105-generic #115-Ubuntu SMP Mon Apr 15 09:52:04 UTC 2024 x86_64
User : realtyna_guys ( 10000)
PHP Version : 8.2.31
Disable Function : opcache_get_status
Directory :  /opt/psa/PMM/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //opt/psa/PMM/sa_convert.sh
#!/bin/bash
### Copyright 1999-2026. WebPros International GmbH. All rights reserved.
# Converts spamassassin bases from db 1.85 to new db format or removes it if db utilities does not exist
#
# Argument is a directory with spamassassin bases
#
# Returns 1 if db format is not 1.85, 0 otherwise

[ -z "$1" ] && exit 1

LIST=`file $1/* | grep 1.85 | cut -f1 -d:`

[ -z "$LIST" ] && exit 1

if [ -x "/usr/bin/db_dump185" ]; then
    DB_DUMP185=/usr/bin/db_dump185
elif [ -x "/usr/bin/db1_dump185" ]; then
    DB_DUMP185=/usr/bin/db1_dump185
elif [ -x "/usr/bin/db3_dump185" ]; then
    DB_DUMP185=/usr/bin/db3_dump185
fi

if [ -x "/usr/bin/db_load" ]; then
    DB_LOAD=/usr/bin/db_load
elif [ -x "/usr/bin/db4.2_load" ]; then
    DB_LOAD=/usr/bin/db4.2_load
elif [ -x "/usr/bin/db4.3_load" ]; then
    DB_LOAD=/usr/bin/db4.3_load
fi

for F in $LIST; do
	if [ -n "$DB_DUMP185" ] && [ -n "$DB_LOAD" ]; then
		DB="$F.db"
		$DB_DUMP185 $F | $DB_LOAD $DB
		mv $DB $F
	else
		rm -f $F
    fi
done

exit 0

Hry