Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
scripts
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
infra
scripts
Commits
ad8413a5
Commit
ad8413a5
authored
Aug 03, 2023
by
Joab Bremer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new file
parent
de86a909
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
monitor_interface.sh
monitor_interface.sh
+14
-0
No files found.
monitor_interface.sh
0 → 100644
View file @
ad8413a5
#!/bin/bash
INTERFACE
=
eth0
GATEWAY_IFUP
=
10.11.0.1
GATEWAY_IFDOWN
=
192.168.0.1
TARGET_HOST
=
8.8.8.8
ping
-c
3
$TARGET_HOST
>
/dev/null
if
[
$?
-eq
0
]
;
then
/sbin/ip route replace default via
$GATEWAY_IFUP
else
/sbin/ip route replace default via
$GATEWAY_IFDOWN
fi
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment