0
点赞
收藏
分享

微信扫一扫

Termux 使用

zhongjh 2022-02-10 阅读 55

1、termux开机启动服务

vim ~/.bashrc
echo "加载启动项..."

# 使用pgrep
if pgrep -x "sshd" >/dev/null
  then
    echo "ssh-service运行中.."
  else
    sshd >/dev/null
    echo "ssh-service已开启..."
fi

if pgrep -x "mysqld_safe" >/dev/null
  then
    echo "mysql运行中..."
  else
    mysqld_safe -u root >/dev/null  &
    echo "mysql已开启..."
fi
举报

相关推荐

0 条评论