⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 restart.sh

📁 文件系统源代码!!!!! 文件系统源代码
💻 SH
字号:
#!/bin/shif [ -z "$1" ]; then  /bin/echo "$0 <command line>"  exit 1fiparam=''list='2 3 4 5 6 7 8 9'for i in $list; do  eval p='$'$i  if [ -z $p ]; then    break  fi  param="$param $p"doneif [ -f /bin/awk ]; then  AWK=/bin/awkelse  AWK=/usr/bin/awkfiif [ -f /bin/grep ]; then  GREP=/bin/grepelse  GREP=/usr/bin/grepfiif [ -f /bin/expr ]; then  EXPR=/bin/exprelse  EXPR=/usr/bin/exprfiprogram=`/bin/echo $1 | $AWK -F '/' '{print $NF;}'`count=`/bin/ps auxww | $GREP -w $program | $GREP -v grep | /usr/bin/wc -l`if [ $count -gt 0 ]; then  i=0  /bin/echo "stopping $program ..."  while [ 1 -eq 1 ]; do    if [ $i -eq 0 ]; then       /usr/bin/killall $program    else       /usr/bin/killall $program >/dev/null 2>&1    fi    if [ $? -ne 0 ]; then      break    fi    /usr/bin/printf .    /bin/sleep 1    i=`$EXPR $i + 1`  donefi/bin/echo ""count=`/bin/ps auxww | $GREP -w $program | $GREP -v grep | $GREP -v $0 | /usr/bin/wc -l`if [ $count -eq 0 ]; then  /bin/echo "starting $program ..."  exec $1 $paramelse  /bin/ps auxww | $GREP -w $program | $GREP -v grep | $GREP -v $0  /bin/echo "already running $program count: $count, restart aborted!"fi

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -