Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
server-utils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NoCloud
server-utils
Commits
57e92cd8
Commit
57e92cd8
authored
10 months ago
by
Elian Loraux
Browse files
Options
Downloads
Patches
Plain Diff
send mail
parent
875e65eb
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
net-switch.sh
+2
-0
2 additions, 0 deletions
net-switch.sh
send_maintenance_mail.sh
+8
-0
8 additions, 0 deletions
send_maintenance_mail.sh
with
10 additions
and
0 deletions
net-switch.sh
+
2
−
0
View file @
57e92cd8
...
...
@@ -46,6 +46,7 @@ if [[ -f "$stateFile" ]]; then
kill
$pid
change_dns
$APIKEY
$tetrixPublicIPOnOVH
echo
"normal"
>
"
$stateFile
"
bash send_maintenance_mail.sh modele-mail-netbascule-stop
fi
else
if
[[
$state
=
"normal"
]]
;
then
...
...
@@ -53,6 +54,7 @@ if [[ -f "$stateFile" ]]; then
bash
$reverseSSHProxyPath
&
change_dns
$APIKEY
$aquilaPublicIPOnOVH
echo
"backup"
>
"
$stateFile
"
bash send_maintenance_mail.sh modele-mail-netbascule-start
fi
fi
else
...
...
This diff is collapsed.
Click to expand it.
send_maintenance_mail.sh
+
8
−
0
View file @
57e92cd8
...
...
@@ -19,6 +19,14 @@ case $1 in
"fin"
)
mutt
-s
"Fin des operations de maintenance"
-i
modele-mail-fin
$mailtosend
;;
"netbasculestart"
)
mailtosend
=
"sysadmin@tetras-libre.fr"
mutt
-s
"Basculement auto du réseau WAN vers 4G"
-i
modele-mail-netbascule-start
$mailtosend
;;
"netbasculestart"
)
mailtosend
=
"sysadmin@tetras-libre.fr"
mutt
-s
"Basculement auto du réseau 4G vers WAN"
-i
modele-mail-netbascule-stop
$mailtosend
;;
*
)
echo
"Usage:
$0
{annonce|debut|fin}"
exit
1
...
...
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