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
3f4d1acc
Verified
Commit
3f4d1acc
authored
1 year ago
by
David Beniamine
Browse files
Options
Downloads
Patches
Plain Diff
Fix upgrade script
parent
fc8c928a
Branches
Branches containing commit
No related tags found
1 merge request
!4
Resolve "Surveillance interne des serveur"
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
upgradeAll.sh
+10
-10
10 additions, 10 deletions
upgradeAll.sh
with
10 additions
and
10 deletions
upgradeAll.sh
+
10
−
10
View file @
3f4d1acc
...
...
@@ -54,21 +54,21 @@ fi
# install monit if not installed
if
[
-z
"
$(
dpkg
-l
|
grep
' monit '
)
"
]
;
then
apt-get update
&&
apt-get
install
-y
monit
ln
-s
/etc/monit/conf-available/disc /etc/monit/conf-enabled/
sed
-i
's/# set httpd/set httpd/'
/etc/monit/monitrc
sed
-i
's/^# allow localhost/ allow localhost/'
/etc/monit/monitrc
echo
-e
"set mailserver 127.0.0.1
\n
set mail-format { from: Monit <monit@
$DOMAIN
>}
\n
set alert root@localhost"
>>
/etc/monit/monitrc
fi
# Monit all partition without swap and boot
list_of_part
=(
`
grep
-v
"#
\|
swap
\|
noauto"
/etc/fstab |
awk
'{print $2}'
`
)
echo
""
>
./
result
echo
""
>
./
$$
-parts
for
part
in
"
${
list_of_part
[@]
}
"
do
echo
-e
"check device root with path
$part
\n
if SPACE usage > 75% then alert
\n
if SPACE usage > 75% timeout 86400 seconds then alert
\n\n
"
>>
./
result
echo
-e
"check device root with path
$part
\n
if SPACE usage > 75% then alert
\n
if SPACE usage > 75% timeout 86400 seconds then alert
\n\n
"
>>
./
$$
-parts
done
ln
-s
/etc/monit/conf-available/disc /etc/monit/conf-enabled/
sed
-i
's/# set httpd/set httpd/'
/etc/monit/monitrc
sed
-i
's/^# allow localhost/ allow localhost/'
/etc/monit/monitrc
echo
-e
"set mailserver 127.0.0.1
\n
set mail-format { from: Monit <monit@
$DOMAIN
>}
\n
set alert root@localhost"
>>
/etc/monit/monitrc
mv
./
$$
-parts
/etc/monit/conf-available/disc
systemctl restart monit
fi
# Check rootkits and antivirus
if
[
`
grep
-c
"^ALLOWHIDDENDIR=/etc/.java"
/etc/rkhunter.conf
`
-eq
0
]
...
...
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