1 #!/bin/bash 2 function hive_stop(){ 3 pid=$(ps ax | grep "hive") 4 kill $pid || echo "hive服务关闭" 5 } 6 case $1 in 7 "start"){ 8 echo "__________启动hive__________" 9 /opt/module/hive/bin/hive 10 };; 11 "stop"){ 12 hive_stop 13 };; 14 esac
1 #!/bin/bash 2 function hive_stop(){ 3 pid=$(ps ax | grep "hive") 4 kill $pid || echo "hive服务关闭" 5 } 6 case $1 in 7 "start"){ 8 echo "__________启动hive__________" 9 /opt/module/hive/bin/hive 10 };; 11 "stop"){ 12 hive_stop 13 };; 14 esac