嗨,到目前为止,我正在尝试使用 sed 将文本添加到文件的第一行
#!/bin/bash
touch test
sed -i -e '1i/etc/example/live/example.com/fullchain.pem;\' test
Run Code Online (Sandbox Code Playgroud)
而且这行不通也试过了
#!/bin/bash
touch test
sed -i "1i ssl_certificate /etc/example/live/example.com/fullchain.pem;" test
Run Code Online (Sandbox Code Playgroud)
当我尝试时,这似乎并不奇怪
#!/bin/bash
touch test
echo "ssl_certificate /etc/example/live/example.com/fullchain.pem;" > test
Run Code Online (Sandbox Code Playgroud)
我在使用时显示第一行文本,cat test
但是一旦我输入,sed -i "2i ssl_certificate_key /etc/example/live/example.com/privkey.pem;"
我就看不到我应该在第 2 行执行的信息,这是 ssl_certificate_key /etc/example/live/example.com/privkey.pem;
所以我要总结的问题
我有通过 clojure 创建的文件
frontendapp.jar
backendapp.jar
Run Code Online (Sandbox Code Playgroud)
并取一个环境变量, APP_PORT
我想了解的是如何将变量传递给 jar 文件,以便它们与变量 APP_PORT 一起运行?
我的假设是这样的
java -jar frontenapp.jar APP_PORT=8080
Run Code Online (Sandbox Code Playgroud)
我的假设正确吗?
如果问题不好,我很抱歉,这是我第一次部署 clojure 应用程序
java clojure clojure-contrib clojure-java-interop clojurescript
您好,我在通过 kubespray 使用 ansible 时不断收到此错误,我想知道如何克服它
TASK [bootstrap-os : Assign inventory name to unconfigured hostnames (non-CoreOS, non-Flatcar, Suse and ClearLinux)] ********************************************************************************************************************************************************************************************************
task path: /home/dc/xcp-projects/kubespray/roles/bootstrap-os/tasks/main.yml:50
<192.168.10.55> (1, b'\x1b[1;31m==== AUTHENTICATING FOR org.freedesktop.hostname1.set-hostname ===\r\n\x1b[0mAuthentication is required to set the local host name.\r\nMultiple identities can be used for authentication:\r\n 1. test\r\n 2. provision\r\n 3. dc\r\nChoose identity to authenticate as (1-3): \r\n{"msg": "Command failed rc=1, out=, err=\\u001b[0;1;31mCould not set property: Connection timed out\\u001b[0m\\n", "failed": true, "invocation": {"module_args": {"name": "node3", "use": null}}}\r\n', b'Shared connection to 192.168.10.55 closed.\r\n') …Run Code Online (Sandbox Code Playgroud)