Php 通过phing ssh执行bash脚本时出错
运行一个通过phing ssh任务安装mysql的脚本,可以得到以下输出:Php 通过phing ssh执行bash脚本时出错,php,bash,ssh,phing,debconf,Php,Bash,Ssh,Phing,Debconf,运行一个通过phing ssh任务安装mysql的脚本,可以得到以下输出: debconf: unable to initialize frontend: Dialog debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.) debconf: falling back to frontend: Readline de
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin:
如果我在通过ssh登录后运行相同的脚本,那么它运行时不会出现任何错误:
我认为负责的脚本是(setup.sh):
这只是第一次发生。如果我运行两次脚本,它将完美地执行
Phing任务仅供参考:
<ssh host="${deploy.host}"
username="${deploy.user}"
privkeyfile="${deploy.pem}"
pubkeyfile="${deploy.pub}"
command="./setup.sh"
display="false"
property="ssh_output"
failonerror="true"
/>
对话框前端在哑终端上无法工作
说明了一切。安装程序试图弹出一个对话框提示输入一些选项,但无法,因为它不是从交互式终端运行的。@MarcB butexport DEBIAN_FRONTEND=noninteractive
应该告诉它是非交互式的吗?
<ssh host="${deploy.host}"
username="${deploy.user}"
privkeyfile="${deploy.pem}"
pubkeyfile="${deploy.pub}"
command="./setup.sh"
display="false"
property="ssh_output"
failonerror="true"
/>