root=>/home/deploy
This commit is contained in:
@@ -9,13 +9,13 @@ module.exports = {
|
||||
dbUtils.query(sql).then(res => {
|
||||
let info = res?.[0]
|
||||
if (info?.id) {
|
||||
let path = `${info.target}`, zipPath = `../zips/${info.id}.zip`
|
||||
let path = `${info.target}`, zipPath = `/home/deploy/node-service/zips/${info.id}.zip`
|
||||
fse.removeSync(zipPath)
|
||||
fse.pathExists(path, (err, exists) => {
|
||||
console.log(`${path}=========>${exists}`)
|
||||
if (exists) {
|
||||
execute(`cd ${path}&&zip -r ${info.id}.zip .`)
|
||||
.then(() => execute(`cd ${path}&&mv ${info.id}.zip /root/node-service/zips`))
|
||||
.then(() => execute(`cd ${path}&&mv ${info.id}.zip /home/deploy/node-service/zips`))
|
||||
.then(() => {
|
||||
console.log('压缩完成!')
|
||||
setTimeout(() => {
|
||||
|
||||
Reference in New Issue
Block a user