I'm running a python script on my rPi. I have to run it in sudo to use the rpi.gpio library, but when I do, it won't let me run my bash script in non-sudo. This causes my ssh commands to prompt for passwords, even though the key-gen authentication is set.
I'm sure I'm missing something simple. Can anyone help?
Running python script:
sudo python ./runcam.py
In the py script I'm running this:
subprocess.call("./runit", shell=True)
And my ssh script:
#!/bin/bash
FNAME=`date +'%H-%M-%S-%m%d%Y'`
ssh [email protected] '
mkdir $FNAME
' &
ssh [email protected] '
mkdir $FNAME
' &
subprocess.call("sudo ./runit", shell=True)?