Merge pull request #666 from midoks/dev

php版本更新及备份优化
pull/669/head
Mr Chen 5 months ago committed by GitHub
commit 4bf5e68a9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      plugins/php/versions/82/install.sh
  2. 4
      plugins/php/versions/83/install.sh
  3. 4
      plugins/php/versions/84/install.sh
  4. 4
      scripts/backup.py

@ -9,7 +9,7 @@ serverPath=$(dirname "$rootPath")
sourcePath=${serverPath}/source sourcePath=${serverPath}/source
sysName=`uname` sysName=`uname`
version=8.2.26 version=8.2.27
PHP_VER=82 PHP_VER=82
Install_php() Install_php()
{ {
@ -50,7 +50,7 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then
fi fi
#检测文件是否损坏. #检测文件是否损坏.
md5_file_ok=54747400cb4874288ad41a785e6147e2ff546cceeeb55c23c00c771ac125c6ef md5_file_ok=3eec91294d8c09b3df80b39ec36d574ed9b05de4c8afcb25fa215d48f9ecbc6b
if [ -f $sourcePath/php/php-${version}.tar.xz ];then if [ -f $sourcePath/php/php-${version}.tar.xz ];then
md5_file=`sha256sum $sourcePath/php/php-${version}.tar.xz | awk '{print $1}'` md5_file=`sha256sum $sourcePath/php/php-${version}.tar.xz | awk '{print $1}'`
if [ "${md5_file}" != "${md5_file_ok}" ]; then if [ "${md5_file}" != "${md5_file_ok}" ]; then

@ -9,7 +9,7 @@ serverPath=$(dirname "$rootPath")
sourcePath=${serverPath}/source sourcePath=${serverPath}/source
sysName=`uname` sysName=`uname`
version=8.3.14 version=8.3.15
PHP_VER=83 PHP_VER=83
Install_php() Install_php()
{ {
@ -50,7 +50,7 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then
fi fi
#检测文件是否损坏. #检测文件是否损坏.
md5_file_ok=58b4cb9019bf70c0cbcdb814c7df79b9065059d14cf7dbf48d971f8e56ae9be7 md5_file_ok=3df5d45637283f759eef8fc3ce03de829ded3e200c3da278936a684955d2f94f
if [ -f $sourcePath/php/php-${version}.tar.xz ];then if [ -f $sourcePath/php/php-${version}.tar.xz ];then
md5_file=`sha256sum $sourcePath/php/php-${version}.tar.xz | awk '{print $1}'` md5_file=`sha256sum $sourcePath/php/php-${version}.tar.xz | awk '{print $1}'`
if [ "${md5_file}" != "${md5_file_ok}" ]; then if [ "${md5_file}" != "${md5_file_ok}" ]; then

@ -9,7 +9,7 @@ serverPath=$(dirname "$rootPath")
sourcePath=${serverPath}/source sourcePath=${serverPath}/source
sysName=`uname` sysName=`uname`
version=8.4.1 version=8.4.2
PHP_VER=84 PHP_VER=84
Install_php() Install_php()
{ {
@ -35,7 +35,7 @@ if [ ! -d $sourcePath/php/php${PHP_VER} ];then
fi fi
#检测文件是否损坏. #检测文件是否损坏.
# md5_file_ok=xxx # md5_file_ok=92636453210f7f2174d6ee6df17a5811368f556a6c2c2cbcf019321e36456e01
# if [ -f $sourcePath/php/php-${version}.tar.xz ];then # if [ -f $sourcePath/php/php-${version}.tar.xz ];then
# md5_file=`sha256sum $sourcePath/php/php-${version}.tar.xz | awk '{print $1}'` # md5_file=`sha256sum $sourcePath/php/php-${version}.tar.xz | awk '{print $1}'`
# if [ "${md5_file}" != "${md5_file_ok}" ]; then # if [ "${md5_file}" != "${md5_file_ok}" ]; then

@ -57,7 +57,7 @@ class backupTools:
outTime = time.time() - startTime outTime = time.time() - startTime
pid = sql.table('sites').where('name=?', (name,)).getField('id') pid = sql.table('sites').where('name=?', (name,)).getField('id')
sql.table('backup').add('type,name,pid,filename,addtime,size', ('0', os.path.basename( sql.table('backup').add('type,name,pid,filename,add_time,size', ('0', os.path.basename(
filename), pid, filename, endDate, os.path.getsize(filename))) filename), pid, filename, endDate, os.path.getsize(filename)))
log = "网站[" + name + "]备份成功,用时[" + str(round(outTime, 2)) + "]秒" log = "网站[" + name + "]备份成功,用时[" + str(round(outTime, 2)) + "]秒"
mw.writeLog('计划任务', log) mw.writeLog('计划任务', log)
@ -175,7 +175,7 @@ class backupTools:
pid = mw.M('databases').dbPos(db_path, db_name).where( pid = mw.M('databases').dbPos(db_path, db_name).where(
'name=?', (name,)).getField('id') 'name=?', (name,)).getField('id')
mw.M('backup').add('type,name,pid,filename,addtime,size', (1, os.path.basename( mw.M('backup').add('type,name,pid,filename,add_time,size', (1, os.path.basename(
filename), pid, filename, endDate, os.path.getsize(filename))) filename), pid, filename, endDate, os.path.getsize(filename)))
log = "数据库[" + name + "]备份成功,用时[" + str(round(outTime, 2)) + "]秒" log = "数据库[" + name + "]备份成功,用时[" + str(round(outTime, 2)) + "]秒"
mw.writeLog('计划任务', log) mw.writeLog('计划任务', log)

Loading…
Cancel
Save