更新下载脚本

This commit is contained in:
aixianling
2022-06-17 15:22:21 +08:00
parent 4fcdee39ed
commit bc76415d6f

View File

@@ -6,13 +6,13 @@ module.exports = {
execute: (request, response) => {
let appid = request.query?.appid
if (appid) {
let path = `/root/node-service/wxmpZips/${appid}/`, zipPath = `../wxmpZips/${appid}.zip`
let path = `/home/deploy/wxmpZips/${appid}/`, zipPath = `/home/deploy/wxmpZips/${appid}.zip`
fse.removeSync(zipPath)
fse.pathExists(path, (err, exists) => {
console.log(`${path}=========>${exists}`)
if (exists) {
execute(`cd ${path}&&zip -r ${appid}.zip .`)
.then(() => execute(`cd ${path}&&mv ${appid}.zip /root/node-service/wxmpZips`))
.then(() => execute(`cd ${path}&&mv ${appid}.zip /home/deploy/wxmpZips`))
.then(() => {
console.log('压缩完成!')
setTimeout(() => {