#!/data/data/com.termux/files/usr/bin/sh

cd ~
cd ~
cd ..
cd usr/var/
mkdir run >/dev/null 2>&1 &
mkdir log >/dev/null 2>&1 &
cd log
mkdir apache2 >/dev/null 2>&1 &
chmod 777 apache2 >/dev/null 2>&1 &
cd ..
cd run
mkdir apache2 >/dev/null 2>&1 &
chmod 777 apache2 >/dev/null 2>&1 &

COUNT1=$(ps -ef |grep mysqld |grep -v "grep" |wc -l)
if [ $COUNT1 -eq 0 ]; then
       mysqld >/dev/null 2>&1 &
fi

COUNT2=$(ps -ef |grep httpd |grep -v "grep" |wc -l)
if [ $COUNT2 -eq 0 ]; then
      apachectl restart >/dev/null 2>&1 &  
fi
echo '运行成功,请打开0.0.0.0:8989,网站目录:内部存储/xinhao/web_config/'