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
ba4c94a3
Verified
Commit
ba4c94a3
authored
Jul 21, 2018
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
Better rkhunter / clamav
parent
81d93b90
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
upgradeAll.sh
+16
-1
16 additions, 1 deletion
upgradeAll.sh
with
16 additions
and
1 deletion
upgradeAll.sh
+
16
−
1
View file @
ba4c94a3
...
@@ -24,6 +24,8 @@ then
...
@@ -24,6 +24,8 @@ then
echo
"Please update your main.env"
echo
"Please update your main.env"
exit
1
exit
1
fi
fi
# Base system update
aptitude update
aptitude update
if
[
"
$MAINTENANCE_LEVEL
"
==
"upgrade"
]
if
[
"
$MAINTENANCE_LEVEL
"
==
"upgrade"
]
then
then
...
@@ -31,6 +33,8 @@ then
...
@@ -31,6 +33,8 @@ then
else
else
unattended-upgrade
unattended-upgrade
fi
fi
# Update modules
for
mod
in
$MODS
for
mod
in
$MODS
do
do
script
=
"
$DIR
/upgrade
$mod
.sh"
script
=
"
$DIR
/upgrade
$mod
.sh"
...
@@ -44,6 +48,8 @@ if [ -f "$customfile" ]
...
@@ -44,6 +48,8 @@ if [ -f "$customfile" ]
then
then
/bin/bash
$customfile
/bin/bash
$customfile
fi
fi
# Check rootkits and antivirus
if
[
-z
"
`
which rkhunter
`
"
]
if
[
-z
"
`
which rkhunter
`
"
]
then
then
aptitude
install
rkhunter
aptitude
install
rkhunter
...
@@ -54,8 +60,17 @@ then
...
@@ -54,8 +60,17 @@ then
systemctl restart ssh
systemctl restart ssh
echo
"Please retest ssh connexion before exiting this session"
echo
"Please retest ssh connexion before exiting this session"
fi
fi
rkhunter
--update
rkhunter
--propupdate
rkhunter
--sk
-c
rkhunter
--sk
-c
if
[
`
crontab
-l
|
grep
-c
"clamav-weekly"
`
-eq
0
]
then
echo
-e
"
\t
ERROR : clamav weekly not installed"
else
less /var/log/clamav.log
less /var/log/clamav.log
fi
# Restart services
services
=
"
`
checkrestart |
awk
'/^service/{print $2} /^systemctl/{print $3}'
`
\
services
=
"
`
checkrestart |
awk
'/^service/{print $2} /^systemctl/{print $3}'
`
\
$EXTRAS_SERVICES_TO_RESTART
"
$EXTRAS_SERVICES_TO_RESTART
"
[
!
-z
"
$services
"
]
&&
systemctl restart
$services
[
!
-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