我正在尝试编写一个脚本来jitsi-meet
自动安装。
在安装过程中,会出现一个对话框。我可以从脚本中自动输入字段的值并进行模拟ENTER
,以便无需任何人工干预即可安装吗?
在对该主题进行更多研究后,我发现没有简单的脚本可以编写来自动输入值。
我发现的唯一可能的解决方案是:
特别是在 jitsi-meet 的情况下,您可以借助 debconf 设置值。安装 debconf-utils:sudo apt install debconf-utils
然后,用于debconf-get-selections | grep jitsi
查看已设置的值并更改值(或设置新值):
echo "jitsi-videobridge jitsi-videobridge/jvb-hostname string my-domain" | debconf-set-selections
echo "jitsi-meet jitsi-meet/cert-choice select Self-signed certificate will be generated" | debconf-set-selections
Or
echo "jitsi-meet jitsi-meet/cert-path-crt string /etc/ssl/my-domain.crt" | debconf-set-selections
echo "jitsi-meet jitsi-meet/cert-choice select A certificate is available and the files are uploaded on the server" | debconf-set-selections
echo "jitsi-meet jitsi-meet/cert-path-key string /etc/ssl/my-domain.key" | debconf-set-selections
您可以
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install jitsi-meet
在安装时使用以避免交互式输入屏幕。:)