Hello,
I’m tinkering on an Elk app that is not a JUCE plugin, but an application that interfaces Raspa directly. I’ve gotten it running on an RasPi4 + HifiBerry DAC2 and Elk.
However, I’d like to have the app start when the device is booting. I noticed systemd
is being used, so attempted to write a service file and enable, but it seems my app is starting too early, before the audio device/driver is ready. I see the following error message: Failed to open driver (Operation not permitted).
, but can ssh into device and start the service every time.
What is the proper systemd service configuration to use? This is my current one (where I’ve called the app X):
[Unit]
Description=X service
Wants=custom-elk.target
After=custom-elk.target
[Service]
User=root
WorkingDirectory=/home/mind
ExecStart=/home/mind/X
Restart=always
[Install]
WantedBy=custom-elk.target
I realize the Wants=
, After=
, WantedBy=
values may not be consistent, but I’ve been trying different combos but no succeeding. Thanks!