Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NoCloud-Auto-Installer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NoCloud
NoCloud-Auto-Installer
Commits
66a282f7
Verified
Commit
66a282f7
authored
7 years ago
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
Run clamav and rkhunter on upgrade
parent
7ac67cf0
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
clamav-weekly.sh
+4
-8
4 additions, 8 deletions
clamav-weekly.sh
installBase.sh
+1
-0
1 addition, 0 deletions
installBase.sh
upgradeAll.sh
+6
-0
6 additions, 0 deletions
upgradeAll.sh
with
11 additions
and
8 deletions
clamav-weekly.sh
+
4
−
8
View file @
66a282f7
...
...
@@ -17,7 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
LOGFILE
=
"/
tmp/clamav-
$(
date
+
'%Y-%m-%d'
)
.log"
;
LOGFILE
=
"/
var/log/clamav
.log"
;
EMAIL_TO
=
"root"
;
DIRTOSCAN
=
"/var/www /home"
;
...
...
@@ -31,9 +31,10 @@ do_sendmail(){
echo
"To:
$EMAIL_TO
"
;
echo
"Content-Type: text/plain; charset=UTF-8"
;
echo
""
;
echo
-e
"
${
message
}
"
)
| sendmail
-t
echo
-e
"
${
message
}
"
)
| sendmail
-t
$EMAIL_TO
}
echo
""
>
$LOGFILE
for
S
in
${
DIRTOSCAN
}
;
do
DIRSIZE
=
$(
du
-sh
"
$S
"
2>/dev/null |
cut
-f1
)
;
...
...
@@ -52,10 +53,5 @@ then
message
=
"Une menace a été detecté sur votre serveur.
\n
Merci de vous
référer au log ci dessous et si besoin de contacter vos
administrateur.rice système."
else
subject
=
"Aucune menace detectée"
message
=
"Aucune menace detectée durant l'analyse hebdomadaire de votre serveur."
fi
do_sendmail
rm
$LOGFILE
fi
This diff is collapsed.
Click to expand it.
installBase.sh
+
1
−
0
View file @
66a282f7
...
...
@@ -69,6 +69,7 @@ DEBIAN_FRONTEND='noninteractive' apt-get -qq install \
php-mcrypt
\
php-mysql
\
postfix
\
rkhunter
\
openssh-server
\
tar
\
tmux
\
...
...
This diff is collapsed.
Click to expand it.
upgradeAll.sh
+
6
−
0
View file @
66a282f7
...
...
@@ -44,6 +44,12 @@ if [ -f "$customfile" ]
then
/bin/bash
$customfile
fi
if
[
-z
"
`
which rkhunter
`
"
]
then
aptitude
install
rkhunter
fi
rkhunter
--sk
-c
less /var/log/clamav.log
services
=
"
`
checkrestart |
awk
'/^service/{print $2} /^systemctl/{print $3}'
`
\
$EXTRAS_SERVICES_TO_RESTART
"
[
!
-z
"
$services
"
]
&&
systemctl restart
$services
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment