Code:
/bin/sh -x /home/tc/start-sbpd.sh
And also
Code:
ls -al /home/tc/
/bin/sh -x /home/tc/start-sbpd.sh
ls -al /home/tc/
[email protected]tchen:~$ ls -l /home/tc/start-sbpd.sh total 8 -rwxr-xr-x 1 tc staff 1301 Jan 4 14:48 start-sbpd.sh
#!/bin/sh # start pigpiod daemon pigpiod -t 0 -f -l -s 10 # wait for pigpiod to initialize - indicated by 'pigs t' exit code of zero count=10 # approx time limit in seconds while ! pigs t >/dev/null 2>&1 ; do if [ $((count--)) -le 0 ]; then printf "\npigpiod failed to initialize within time limit\n" exit 1 # or however you want to deal with failure fi # printf "\nWaiting for pigpiod to initialize\n" sleep 1 done printf "\npigpiod is running\n" # load uinput module - required to be able to send keystrokes # then set the permission to group writable, so you don't need to run sbpd with root permissions sudo modprobe uinput sudo chmod g+w /dev/uinput # issue the sbpd command sbpd -d b,16,NEXT b,13,PLAY b,26,PREV
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, personalize advertising, and to analyze site activity. We may share certain information about our users with our advertising and analytics partners. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: