Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
liyapeng
/
log_collect
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6a9418b3
authored
Oct 13, 2023
by
liyapeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ceshi
1 parent
3e6d0cce
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
adl_log_collect.sh
adl_log_collect.sh
View file @
6a9418b
...
@@ -16,11 +16,10 @@ operation() {
...
@@ -16,11 +16,10 @@ operation() {
echo
"[5]done"
echo
"[5]done"
}
}
main
()
{
if
[
$(
whoami
)
!
=
"root"
]
;
then
if
[
$(
whoami
)
!
=
"root"
]
;
then
echo
" only root can run me"
echo
" only root can run me"
exit
1
exit
1
else
else
#判断是否存在wget、curl
#判断是否存在wget、curl
check_wget
=
$(
which wget
)
check_wget
=
$(
which wget
)
if
[
$?
-ne 0
]
;
then
if
[
$?
-ne 0
]
;
then
...
@@ -32,5 +31,4 @@ main() {
...
@@ -32,5 +31,4 @@ main() {
wget -q
${
LOG_COLLECT_FILE_URL
}
>>/dev/null
wget -q
${
LOG_COLLECT_FILE_URL
}
>>/dev/null
operation
operation
fi
fi
fi
fi
}
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