Commit 6a9418b3 by liyapeng

ceshi

1 parent 3e6d0cce
Showing with 3 additions and 5 deletions
...@@ -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
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!