Skip to content

Commit

Permalink
Merge pull request #49 from extremeshok/dev
Browse files Browse the repository at this point in the history
5.0.2
  • Loading branch information
extremeshok committed Mar 24, 2016
2 parents b51d5a0 + d91d496 commit fb42db4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,13 @@ Usage of free Linux Malware Detect clamav signatures: https://www.rfxn.com/proje
- Enabled by default, no configuration required

## Change Log
### Version 5.0.1 (updated 2016-03-24)
### Version 5.0.2 (updated 2016-03-24)
- eXtremeSHOK.com Maintenance
- Detect if the entire script is available/complete
- Fix for Missing space between "]

### Version 5.0.1
- eXtremeSHOK.com Maintenance
- Disable logging if the log file is not writable.
- Do not attempt to log before a config is loaded

Expand Down
30 changes: 18 additions & 12 deletions clamav-unofficial-sigs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@

################################################################################

# Detect to make sure the entire script is avilable, fail if the script is missing contents
if [ ! "` tail -1 "$0" | head -1 | cut -c1-7 `" == "exit \$?" ] ; then
echo "FATAL ERROR: Script is incomplete, please redownload"
exit 1
fi

# Function to support user config settings for applying file and directory access permissions.
function perms () {
if [ -n "$clam_user" -a -n "$clam_group" ] ; then
Expand Down Expand Up @@ -146,7 +152,7 @@ function help_and_usage () {
}

#Script Info
version="5.0.1"
version="5.0.2"
minimum_required_config_version="55"
version_date="24 March 2016"

Expand Down Expand Up @@ -1095,7 +1101,7 @@ if [ "$sanesecurity_enabled" == "yes" ] ; then
true
else
xshok_pretty_echo_and_log "Clamscan reports Sanesecurity $db_file database integrity tested BAD"
if [ "$remove_bad_database" == "yes"] ; then
if [ "$remove_bad_database" == "yes" ] ; then
if rm -f "$sanesecurity_dir/$db_file" ; then
xshok_pretty_echo_and_log "Removed invalid database: $sanesecurity_dir/$db_file"
fi
Expand Down Expand Up @@ -1208,7 +1214,7 @@ if [ "$securiteinfo_enabled" == "yes" ] ; then
true
else
xshok_pretty_echo_and_log "Clamscan reports SecuriteInfo $db_file database integrity tested BAD"
if [ "$remove_bad_database" == "yes"] ; then
if [ "$remove_bad_database" == "yes" ] ; then
if rm -f "$securiteinfo_dir/$db_file" ; then
xshok_pretty_echo_and_log "Removed invalid database: $securiteinfo_dir/$db_file"
fi
Expand Down Expand Up @@ -1239,7 +1245,7 @@ if [ "$securiteinfo_enabled" == "yes" ] ; then
else
xshok_pretty_echo_and_log "Clamscan reports SecuriteInfo $db_file database integrity tested BAD"
rm -f "$securiteinfo_dir/$db_file"
if [ "$remove_bad_database" == "yes"] ; then
if [ "$remove_bad_database" == "yes" ] ; then
if rm -f "$securiteinfo_dir/$db_file" ; then
xshok_pretty_echo_and_log "Removed invalid database: $securiteinfo_dir/$db_file"
fi
Expand Down Expand Up @@ -1331,7 +1337,7 @@ if [ "$linuxmalwaredetect_enabled" == "yes" ] ; then
true
else
xshok_pretty_echo_and_log "Clamscan reports linuxmalwaredetect $db_file database integrity tested BAD"
if [ "$remove_bad_database" == "yes"] ; then
if [ "$remove_bad_database" == "yes" ] ; then
if rm -f "$linuxmalwaredetect_dir/$db_file" ; then
xshok_pretty_echo_and_log "Removed invalid database: $linuxmalwaredetect_dir/$db_file"
fi
Expand Down Expand Up @@ -1360,7 +1366,7 @@ if [ "$linuxmalwaredetect_enabled" == "yes" ] ; then
true
else
xshok_pretty_echo_and_log "Clamscan reports linuxmalwaredetect $db_file database integrity tested BAD"
if [ "$remove_bad_database" == "yes"] ; then
if [ "$remove_bad_database" == "yes" ] ; then
if rm -f "$linuxmalwaredetect_dir/$db_file" ; then
xshok_pretty_echo_and_log "Removed invalid database: $linuxmalwaredetect_dir/$db_file"
fi
Expand Down Expand Up @@ -1480,7 +1486,7 @@ if [ "$malwarepatrol_enabled" == "yes" ] ; then
true
else
xshok_pretty_echo_and_log "Clamscan reports MalwarePatrol $malwarepatrol_db database integrity tested BAD"
if [ "$remove_bad_database" == "yes"] ; then
if [ "$remove_bad_database" == "yes" ] ; then
if rm -f "$malwarepatrol_dir/$malwarepatrol_db" ; then
xshok_pretty_echo_and_log "Removed invalid database: $malwarepatrol_dir/$malwarepatrol_db"
fi
Expand Down Expand Up @@ -1509,7 +1515,7 @@ if [ "$malwarepatrol_enabled" == "yes" ] ; then
true
else
xshok_pretty_echo_and_log "Clamscan reports MalwarePatrol $malwarepatrol_db database integrity tested BAD"
if [ "$remove_bad_database" == "yes"] ; then
if [ "$remove_bad_database" == "yes" ] ; then
if rm -f "$test_dir/$malwarepatrol_db" ; then
xshok_pretty_echo_and_log "Removed invalid database: $test_dir/$malwarepatrol_db"
fi
Expand Down Expand Up @@ -1604,7 +1610,7 @@ if [ "$yararules_enabled" == "yes" ] ; then
true
else
xshok_pretty_echo_and_log "Clamscan reports yararules $db_file database integrity tested BAD"
if [ "$remove_bad_database" == "yes"] ; then
if [ "$remove_bad_database" == "yes" ] ; then
if rm -f "$yararules_dir/$db_file" ; then
xshok_pretty_echo_and_log "Removed invalid database: $yararules_dir/$db_file"
fi
Expand Down Expand Up @@ -1633,7 +1639,7 @@ if [ "$yararules_enabled" == "yes" ] ; then
true
else
xshok_pretty_echo_and_log "Clamscan reports yararules $db_file database integrity tested BAD"
if [ "$remove_bad_database" == "yes"] ; then
if [ "$remove_bad_database" == "yes" ] ; then
if rm -f "$yararules_dir/$db_file" ; then
xshok_pretty_echo_and_log "Removed invalid database: $yararules_dir/$db_file"
fi
Expand Down Expand Up @@ -1715,7 +1721,7 @@ if [ -n "$add_dbs" ] ; then
true
else
xshok_pretty_echo_and_log "Clamscan reports User Added $db_file database integrity tested BAD"
if [ "$remove_bad_database" == "yes"] ; then
if [ "$remove_bad_database" == "yes" ] ; then
if rm -f "$add_dir/$db_file" ; then
xshok_pretty_echo_and_log "Removed invalid database: $add_dir/$db_file"
fi
Expand Down Expand Up @@ -1887,5 +1893,5 @@ xshok_pretty_echo_and_log "Issue tracker : https://github.com/extremeshok/clamav

xshok_pretty_echo_and_log " Powered By https://eXtremeSHOK.com " "#"

# And lastly we exit
# And lastly we exit, Note: the exit is always on the 2nd last line
exit $?

0 comments on commit fb42db4

Please sign in to comment.