Systemd ExecStartPre在下一行中的ExecStart之前获取变量

汤马士·刘

在Systemd上,我想执行以下命令,该命令在shell上可以正常工作:

/usr/bin/company_program --init.d `/usr/bin/lua -l company_exec -e 'dofile("/etc/company_profiles"); print(table.concat(company_exec.table_to_companyexec_argv(default), " "))'`

我如何将其传输到运行的ExecStartPre:

/usr/bin/lua -l company_exec -e 'dofile("/etc/company_profiles"); print(table.concat(company_exec.table_to_companyexec_argv(default), " "))'

然后将结果输入到运行的ExecStart中:

/usr/bin/company_program --init.d `${previous_execstartpre_lua_result}`
马克·斯托斯伯格

将这两行都放入脚本中,然后从一个ExecStart=命令中运行它

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章