fix: 脚本拷贝失败

This commit is contained in:
xiao 2024-11-04 20:10:52 +08:00
parent 4c04138e32
commit f2173baad4
2 changed files with 34 additions and 1 deletions

View File

@ -25,7 +25,7 @@ ENV LC_ALL en_US.UTF-8
ENV LC_CTYPE en_US.UTF-8
# 复制 bt.sh 文件
COPY /bt.sh /bt.sh
COPY bt.sh /bt.sh
# 转换 bt.sh 文件的换行符
RUN dos2unix /bt.sh

33
arm64/bt.sh Normal file
View File

@ -0,0 +1,33 @@
#!/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