在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] 删除。
我来说两句