From 451c68a3930af3027bc47a34fe03005787d37e70 Mon Sep 17 00:00:00 2001 From: xiao Date: Sat, 2 Nov 2024 12:53:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=90=AF=E5=8A=A8=E6=97=B6=E5=90=AF?= =?UTF-8?q?=E5=8A=A8lnmp=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bt.sh | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/bt.sh b/bt.sh index 7a17264..63c5af9 100644 --- a/bt.sh +++ b/bt.sh @@ -1,5 +1,33 @@ -/etc/init.d/bt restart -pkill crond -/sbin/crond -/usr/sbin/sshd -D & -tail -f /dev/null \ No newline at end of file +#!/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