IceG
January 17, 2023, 8:59am
1
Hey,
I guess the question is trivial, but I need to turn off the LED in my package and I'm having trouble with it.
I added to acl.d
"/bin/echo *": [ "exec" ],
"/sys/class/leds *": [ "write" ],
And I got stuck on executing the command correctly
echo "0" > /sys/class/leds/pca963x:caiman:white:wps/brightness
fs.exec_direct('/bin/echo', [ ? ]);
IceG
January 18, 2023, 9:59am
2
Of course, I could push it to some bash script and that way works, but I'd rather avoid it.
@jow maybe You could give me a hint?
jow
January 18, 2023, 10:18am
3
Hi.
Use:
"/sys/class/leds/*/brightness": [ "write" ],
and
fs.write('/sys/class/leds/pca963x:caiman:white:wps/brightness', '0')
no executable permissions required
1 Like
IceG
January 18, 2023, 11:19am
4
Thanks @jow for the hint. Before writing this second post, I also thought about fs.write and weird, but it didn't want to work for me. Will try again tonight when I get home from work.
Edit.
Sure, if I improve acl.d it will work.
system
Closed
January 28, 2023, 11:20am
5
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.