Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It can't find "gpio-admin" when I run a node server by /etc/init.d/ #3

Open
smvv21 opened this issue Jul 16, 2014 · 3 comments
Open

Comments

@smvv21
Copy link

smvv21 commented Jul 16, 2014

I made a node server, using pi + node + express + pi-gpio . And I also use FOREVER to run the server forever.
It work well when I run it as "node app.js" or "forever start app.js". The pi-gpio can work conrectly and GPIO can work too.

but , if I add the FOREVER command to a /etc/init.d/ service, for example, /etc/init.d/nodepi, it won't work well. It said "GPIO admin can't find".

the /etc/init.d/nodepi's content like this:
forever start node app.js

After running the /etc/init.d/nodepi, the webserver has started and I can visit it. But the GPIO of PI couldn't work.

Weirdly, If I run another command after this, "PORT=1234 node app.js" , I can visit the website by PORT 1234. And then, The GPIO works!. When I return to visit PORT 3000 website (the app.js default port) I can control the GPIO. It's working!

I think there might be some problem on user's rights.
All those operations are ran by root.

@omkarkhair
Copy link

I have the same issue. gpio-admin: not found on boot. Any known work arounds?

@Connor-Knabe
Copy link

Implement the pull request #6 after installing quick2wire instructions can be found: https://www.npmjs.com/package/pi-gpio#installation

@maddios
Copy link

maddios commented May 25, 2017

fix for this in my case was to edit pi-gpio.js, changing line 4 to

var gpioAdmin = "/usr/local/bin/gpio-admin",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants