0

I have process, that i run in this way :

sudo RADIODEV=/dev/spidev0.0 /opt/basicstation/build-rpi-std/bin/station -d -h /opt/basicstation/build-rpi-std/bin

I would like to lunch it on raspberry boot with systemctl like that :

[Unit]
Description=Basic station secure websocket
Wants=network-online.target
After=network-online.target

[Service]
User=root
Group=root
ExecStart= RADIODEV=/dev/spidev0.0 /opt/basicstation/build-rpi-std/bin/station -d -h /opt/basicstation/build-rpi-std/bin

[Install]
WantedBy=multi-user.target
Alias=basic_station.service

So i want to know how put the argument

RADIODEV=/dev/spidev0.0 -d -h /opt/basicstation/build-rpi-std/bin

because wheni just put :

 ExecStart= RADIODEV=/dev/spidev0.0 /opt/basicstation/build-rpi-std/bin/station -d -h /opt/basicstation/build-rpi-std/bin 

That's not work

I already check some issue like : issue systemd

But i can't reproduce what they propose.

jayen marco
  • 103
  • 2
  • 12
  • [so] is for programming questions, not questions about using or configuring Unix and its utilities. [unix.se] or [su] would be better places for questions like this. – Barmar May 14 '20 at 20:29
  • 2
    See [this question](https://serverfault.com/questions/413397/how-to-set-environment-variable-in-systemd-service) for how to set an environment variable. – that other guy May 14 '20 at 20:46

0 Answers0