Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-admin-essentials
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etersoft-admin-essentials
Commits
af5b1cf9
Commit
af5b1cf9
authored
Oct 04, 2015
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rewrite background for monit coexistance
parent
49ca73cd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
+16
-7
check_connectivity.sh
router/check_connectivity.sh
+16
-1
remove_cache.sh
router/remove_cache.sh
+0
-6
No files found.
router/check_connectivity.sh
View file @
af5b1cf9
...
@@ -2,6 +2,13 @@
...
@@ -2,6 +2,13 @@
cd
$(
dirname
$0
)
cd
$(
dirname
$0
)
if
[
"
$1
"
=
"stop"
]
;
then
echo
"
$(
date
)
Watcher is stopped"
>>
/var/log/check_connectivity.log
kill
$(
cat
/var/run/check_connectivity.pid
)
rm
-f
/var/run/check_connectivity.pid
exit
fi
# ya.ru google.com
# ya.ru google.com
HOSTS
=
"93.158.134.3 173.194.71.139"
HOSTS
=
"93.158.134.3 173.194.71.139"
...
@@ -55,7 +62,11 @@ set_state_by_bgp()
...
@@ -55,7 +62,11 @@ set_state_by_bgp()
[
"
$SPROMETEY
"
=
"ok"
]
&&
NEWSTATE
=
prometey
&&
return
[
"
$SPROMETEY
"
=
"ok"
]
&&
NEWSTATE
=
prometey
&&
return
}
}
main_cycle
()
{
./both_provs.sh
./both_provs.sh
echo
"
$(
date
)
Start with both state"
>>
/var/log/check_connectivity.log
while
true
;
do
while
true
;
do
set_state
set_state
...
@@ -81,8 +92,12 @@ while true ; do
...
@@ -81,8 +92,12 @@ while true ; do
;;
;;
esac
esac
echo
"
State changed to
$NEWSTATE
"
echo
"
$(
date
)
State changed to
$NEWSTATE
"
>>
/var/log/check_connectivity.log
STATE
=
$NEWSTATE
STATE
=
$NEWSTATE
fi
fi
sleep
7
sleep
7
done
done
}
main_cycle &
echo
$!
>
/var/run/check_connectivity.pid
router/remove_cache.sh
deleted
100755 → 0
View file @
49ca73cd
#!/bin/sh
# update eepm and use eepm clean
rm
-vf
/var/cache/apt/
*
.bin
rm
-vf
/var/lib/apt/lists/
*
pkglist
*
rm
-vf
/var/lib/apt/lists/
*
release
*
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