on Systemd I would like to execute following command which works fine on shell manually:
/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), " "))'`
How could I transfer it to ExecStartPre which runs:
/usr/bin/lua -l company_exec -e 'dofile("/etc/company_profiles"); print(table.concat(company_exec.table_to_companyexec_argv(default), " "))'
Then feed the result to ExecStart which runs:
/usr/bin/company_program --init.d `${previous_execstartpre_lua_result}`
export
will help in this issueexport
will help in this issue. Pass the output into a variable then export that.