Thread
:
Situations app - bugs, questions, answers, help etc..
View Single Post
nonsuch
2020-08-27 , 06:22
Posts: 584 | Thanked: 1,554 times | Joined on Sep 2019
#
483
I have been using Situations for a while.
It works well with switching wifi on and off depending on whether I'm home or not.
Now I am trying to activate BatteryBuddy when the charger is connected, and deactivate it when the charger is disconnected.
I figured out that I need the Command module for both actions, because I just want to launch the daemon.
So I have:
Name: Charging
When: Device = Charger
What: Command: harbour-batterybuddy-daemon
What: log to situations-buddy-on.txt
This works as expected. (*)
Name: Not Charging
When: Device != Charger
What: Command: /home/nemo/situations/kill-batterybuddy-daemon <=== Problem here
What: log to situations-buddy-off.txt
This works so far that the situation changes correctly when I disconnect the charger, but the command does not: first I just used "killall harbour-batterybuddy-daemon". This works when executed on the command line (ssh), but not through Situations.
Then, I wrapped it in a shell script. Again, this works when executed on the command line but not through situations. (*)
Nothing helpful in the logs (just START/STOP messages).
I told the kill script to log its activity, too, but it logs only when executed manually. Which leads me to believe that Situations does not execute the kill script at all.
Why?
(*) I am confirming with 'ps aux | grep buddy'.
__________________
N900 in 2020
SFOS in 2021
Quote & Reply
|
nonsuch
View Public Profile
Send a private message to nonsuch
Visit nonsuch's homepage!
Find all posts by nonsuch