feat: 启动时启动lnmp环境
This commit is contained in:
parent
0f17616182
commit
451c68a393
38
bt.sh
38
bt.sh
@ -1,5 +1,33 @@
|
||||
/etc/init.d/bt restart
|
||||
pkill crond
|
||||
/sbin/crond
|
||||
/usr/sbin/sshd -D &
|
||||
tail -f /dev/null
|
||||
#!/bin/bash
|
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
|
||||
export PATH
|
||||
|
||||
init_path=/etc/init.d
|
||||
Root_Path=`cat /var/bt_setupPath.conf`
|
||||
Setup_Path=$Root_Path/server/mysql
|
||||
Data_Path=$Root_Path/server/data
|
||||
|
||||
soft_start(){
|
||||
${init_path}/nginx start
|
||||
${init_path}/php-fpm-83 start
|
||||
${init_path}/bt restart
|
||||
pkill crond
|
||||
/sbin/crond
|
||||
/usr/sbin/sshd -D &
|
||||
}
|
||||
|
||||
is_empty_Data(){
|
||||
return `ls -A ${Data_Path}/|wc -w`
|
||||
}
|
||||
|
||||
start_mysql(){
|
||||
chown -R mysql:mysql ${Data_Path}
|
||||
chgrp -R mysql ${Setup_Path}/.
|
||||
${init_path}/mysqld start
|
||||
rm -f /init_mysql.sh
|
||||
}
|
||||
|
||||
soft_start > /dev/null
|
||||
is_empty_Data > /dev/null
|
||||
start_mysql > /dev/null
|
||||
tail -f /dev/null
|
||||
|
Loading…
x
Reference in New Issue
Block a user