从 bash 脚本创建域时 Plesk bin 站点错误

问题描述

我在 plesk 上创建域时遇到问题,此命令在通过 cli 运行时可以正常工作:

plesk bin site --create newdomain.com -webspace-name existingdomain.com -www-root /httpdocs

但是当我将上面相同的代码添加到 bash 脚本 (create_domain.sh) 并尝试运行它时:

sudo bash create_domain.sh

我收到以下错误

An error occurred during domain creation: hosting update is Failed: cObject->update() Failed: Some fields are empty or contain an improper value. ('www_root' = ')

有人知道为什么会这样吗?

解决方法

这是因为我用windows来编辑bash文件,我把它删除了,然后用nano重写了,成功了