Noob question, but hopefully someone can help me out here. I'm transitioning from init.d to systemd on my RPi running Linux, as I'm told it would cut my boot time in half.
My init script requires sudo as it needs to access GPIO components.
init.d service
My /etc/init.d/hue
command looked like this before:
sudo python /home/pi/hue/app.py
systemd service
[Unit]
Description=Hue Controller
[Service]
Type=simple
ExecStart=sudo /usr/bin/python /home/pi/hue/app.py
[Install]
WantedBy=multi-user.target
When I run $ systemctl start hue.service
the following error message:
Failed to issue method call: Access denied
I've been tinkering with things for hours now and I haven't gotten around this issue. I've tried putting the ExecStart script in another bash file and pointing to that, changing my etc/sudoers to allow all for root, but nothing is working.
Any ideas?