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