Skip to content
Snippets Groups Projects
Commit 982f6c49 authored by Andrei Gherzan's avatar Andrei Gherzan :penguin:
Browse files

vending-machine-control-application: Switch systemd service to using EnvironmentFile


Signed-off-by: Andrei Gherzan's avatarAndrei Gherzan <andrei.gherzan@huawei.com>
parent 08803952
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ Description=Vending Machine Control Application
[Service]
Type=notify
Environment="VENDING_MACHINE_CONTROL_I2C_BUS=@VENDING_MACHINE_CONTROL_I2C_BUS@"
EnvironmentFile=-/etc/vending-machine.env
ExecStart=/usr/bin/vending-machine-control-application
Restart=always
......
......@@ -31,6 +31,7 @@ do_install() {
oe_runmake install
install -d "${D}${systemd_system_unitdir}/"
install -m 0644 "${WORKDIR}/${BPN}.service" "${D}${systemd_system_unitdir}/"
sed -i -e 's,@VENDING_MACHINE_CONTROL_I2C_BUS@,${VENDING_MACHINE_CONTROL_I2C_BUS},g' \
"${D}${systemd_system_unitdir}/${BPN}.service"
install -d "${D}${sysconfdir}"
echo "VENDING_MACHINE_CONTROL_I2C_BUS=${VENDING_MACHINE_CONTROL_I2C_BUS}" > \
"${D}${sysconfdir}/vending-machine.env"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment