我已经制作了一个菜单,其中第一个选项是启动,第二个是停止服务,第三个我要开发的是重新启动,其中服务将首先停止,然后会有 20 秒的休息时间,然后服务将是现在重新开始请告知重启选项,我的代码是否正确。我还想显示一个停止手表,它会显示反向计数,如 1,然后是 2,然后是 3,然后是 20,它会说启动服务
echo "Please enter the appropriate choice for doing the operations"
echo "
1) STOP Services
2) START Services
3 RestartServices Within 20 seconds
case $choice in
1)
echo "*************Stopping Services**************"
stopAll.sh
;;
2)
echo "*************Starting Services**************"
startAll.sh
;;
3)
echo "*************Restarting services within 20 Seconds*************"
stopAll.sh
sleep 20 seconds //please avise is this this correct way to sleep the services for 20 seconnds..??////
startAll.sh
;;