Skip to content

Commit

Permalink
Cron script update
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul authored and Paul committed Jun 9, 2020
1 parent 7ffda44 commit 6d99b43
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
10 changes: 3 additions & 7 deletions src/bin/update
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,10 @@ else
local_version='unknown';
fi

if [ -e "/etc/cron.daily/cp-maldet" ]; then
rm /etc/cron.daily/cp-maldet
fi

if [ "$local_version" == "$remote_version" ]; then
if [ -z "$PS1" ]; then
echo "cpanel_addon-maldet is up to date";
fi
case $- in
*i*) echo "cpanel_addon-maldet is up to date";
esac
else
echo "Updating plugin";
workdir=`mktemp -d /root/XXXXXXX`
Expand Down
3 changes: 2 additions & 1 deletion src/cron/custom.cron
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env bash
if [ -d "/usr/local/cpanel" ] && [ -x "/var/cpanel/addons/maldet/bin/homematch" ]; then
#cpanel
HOMEMATCH=`/var/cpanel/addons/maldet/bin/homematch`
/usr/local/maldetect/maldet -b -r $HOMEMATCH?/?/public_html 2 >> /dev/null 2>&1
$inspath/maldet -b -r $HOMEMATCH?/?/public_html $scan_days >> /dev/null 2>&1
fi

/var/cpanel/addons/maldet/bin/update
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.1
0.3.2

0 comments on commit 6d99b43

Please sign in to comment.