-
Notifications
You must be signed in to change notification settings - Fork 24
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
Comments
most likely this line is causing the issue
https://github.com/bahamas10/hue-cli/blob/master/hue-cli.js#L22
try setting one of those variables in the bash script before executing the
program... like
``` bash
#!/usr/bin/env bash
export HOMEPATH=/home/user
...
```
where `/home/user` is the path that contains a `.hue.json` config file
…On Sun, Dec 11, 2016 at 7:28 AM, scr44tch ***@***.***> wrote:
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,
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#16>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABJl2okunOW5fZpdv57t_d_N6exHU91Hks5rG-x5gaJpZM4LJ6aR>
.
|
export HOMEPATH=/home/user --> thx it works now!! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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,
The text was updated successfully, but these errors were encountered: