Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
irul
/
tools
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit dbd2750c
authored
Sep 12, 2020
by
irul
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Menambahkan timeout saat pengecekan site
1 parent
e4fa90a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
server_info.sh
server_info.sh
View file @
dbd2750
...
@@ -119,7 +119,7 @@ if dpkg --get-selections | grep -E '(^|\s)apache2($|\s)' &> /dev/null ; then
...
@@ -119,7 +119,7 @@ if dpkg --get-selections | grep -E '(^|\s)apache2($|\s)' &> /dev/null ; then
SITES_CNT
=
1
SITES_CNT
=
1
for
SITE
in
$SITES
for
SITE
in
$SITES
do
do
if
curl -I
"
$SITE
"
2>&1 | grep -w
"200
\|
301"
> /dev/null ;
then
if
curl -I
-m 10
"
$SITE
"
2>&1 | grep -w
"200
\|
301"
> /dev/null ;
then
echo
"
$SITES_CNT
$SITE
is up"
echo
"
$SITES_CNT
$SITE
is up"
else
else
echo
"
$SITES_CNT
$SITE
is down"
echo
"
$SITES_CNT
$SITE
is down"
...
@@ -138,7 +138,7 @@ if dpkg --get-selections | grep -E '(^|\s)nginx($|\s)' &> /dev/null ; then
...
@@ -138,7 +138,7 @@ if dpkg --get-selections | grep -E '(^|\s)nginx($|\s)' &> /dev/null ; then
SITES_CNT
=
1
SITES_CNT
=
1
for
SITE
in
$SITES
for
SITE
in
$SITES
do
do
if
curl -I
"
$SITE
"
2>&1 | grep -w
"200
\|
301"
> /dev/null ;
then
if
curl -I
-m 10
"
$SITE
"
2>&1 | grep -w
"200
\|
301"
> /dev/null ;
then
echo
"
$SITES_CNT
$SITE
is up"
echo
"
$SITES_CNT
$SITE
is up"
else
else
echo
"
$SITES_CNT
$SITE
is down"
echo
"
$SITES_CNT
$SITE
is down"
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment