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

cant execute via apache #16

Closed
rj-d2 opened this issue Dec 11, 2016 · 2 comments
Closed

cant execute via apache #16

rj-d2 opened this issue Dec 11, 2016 · 2 comments

Comments

@rj-d2
Copy link

rj-d2 commented Dec 11, 2016

When i try to run a bash script turning my light on and off via apache i get this error:

path.js:7 throw new TypeError('Path must be a string. Received ' + inspect(path)); ^ TypeError: Path must be a string. Received undefined at assertPath (path.js:7:11) at Object.join (path.js:1211:7) at Object. (/usr/lib/node_modules/hue-cli/hue-cli.js:23:23) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.runMain (module.js:604:10) at run (bootstrap_node.js:394:7)

it works as expected in when i call it via ssh

here is the script:

#!/bin/bash lights=$(hue lights 1,2,4) if [[ $lights = *off* ]]; then hue lights 1,2,4 on fi if [[ $lights = *on* ]]; then hue lights 1,2,3,4 off fi

would be great if i could execute the script via the webserver,

@bahamas10
Copy link
Owner

bahamas10 commented Dec 11, 2016 via email

@rj-d2
Copy link
Author

rj-d2 commented Dec 11, 2016

export HOMEPATH=/home/user --> thx it works now!!

@rj-d2 rj-d2 closed this as completed Dec 11, 2016
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

2 participants