Active Topics

 


Reply
Thread Tools
Guest | Posts: n/a | Thanked: 0 times | Joined on
#31
Originally Posted by solbrit View Post
Hmm, I somehow lost track of prey.timer when updating the ui. I'm adding it to the start/stop button to enable/disable .timer and .service simultaneously. This should make more sense seeing as how disabling .service only won't keep it from running when called by timer, right? Correct me if I'm wrong...
Stopping the prey.timer, and disabling prey.timer should be sufficient. The prey.service is only run, when called by prey.timer.
 

The Following User Says Thank You to For This Useful Post:
solbrit's Avatar
Posts: 126 | Thanked: 59 times | Joined on Jan 2011
#32
Originally Posted by nieldk View Post
Stopping the prey.timer, and disabling prey.timer should be sufficient. The prey.service is only run, when called by prey.timer.
That's what I thought, my bad.
With timer active prey.service should run once every hour, meaning checking your device on https://panel.preyproject.com/devices should never show Offline for >1 hour, right? In my case only running prey.service manually will update the info on url though, suggesting the timer doesn't actually call prey.service, or have I understood it all wrong?
 
Guest | Posts: n/a | Thanked: 0 times | Joined on
#33
Originally Posted by solbrit View Post
That's what I thought, my bad.
With timer active prey.service should run once every hour, meaning checking your device on https://panel.preyproject.com/devices should never show Offline for >1 hour, right? In my case only running prey.service manually will update the info on url though, suggesting the timer doesn't actually call prey.service, or have I understood it all wrong?
The prey.timer is responsible for calling prey.service once an hour.
However, this may be missed, for example, the device goes to sleep. It will then call again on the next hour, depending if the device is not sleeping/have Internet access etc.
Calling the prey.service (or even the prey.sh script) manually, yes, that will trigger a login, notifying prey servers that the device has activated and responding to the device with actions to take.
So, the prey.timer calls prey.service, just as you could do manually.
 

The Following 2 Users Say Thank You to For This Useful Post:
solbrit's Avatar
Posts: 126 | Thanked: 59 times | Joined on Jan 2011
#34
Originally Posted by nieldk View Post
...However, this may be missed, for example, the device goes to sleep. It will then call again on the next hour, depending if the device is not sleeping/have Internet access etc...
Thanks, that explains it, it's the whole Jolla-when-sleeping-is-dead-to-the-world deal. This can make communication a bit tricky for Prey I suppose.
 
Guest | Posts: n/a | Thanked: 0 times | Joined on
#35
Originally Posted by solbrit View Post
Thanks, that explains it, it's the whole Jolla-when-sleeping-is-dead-to-the-world deal. This can make communication a bit tricky for Prey I suppose.
it will report eventually, in my experience worst case between contact is around 4 hours, this could possibly be reduced with a more agressive timer. But I think the 1 hr setting is an Ok compromise for service/battery/reliability and assurance. Best is if lock-code is set by user obviously. I hope to further expand this to include the option to enable lock code remotely - perhaps Jolla will incorporate this better eventually
 

The Following User Says Thank You to For This Useful Post:
Posts: 131 | Thanked: 241 times | Joined on Feb 2012
#36
Enabling a timer is not enough. I changed the code, so that after a timer is enabled, he is also started. Otherwise, the timer would work only after a reboot.

So
systemctl enable prey.timer
enables the timer, but he is executed after a reboot.
systemctl start prey.timer
enables the timer instantly.
 
Guest | Posts: n/a | Thanked: 0 times | Joined on
#37
Originally Posted by HolgerN View Post
Enabling a timer is not enough. I changed the code, so that after a timer is enabled, he is also started. Otherwise, the timer would work only after a reboot.

So

enables the timer, but he is executed after a reboot.
enables the timer instantly.
Yes, starting timer is needed - or reboot.
I didnt start the timer, since the config file was needing update with the owners API key, before this would work anyways.
 

The Following User Says Thank You to For This Useful Post:
Posts: 281 | Thanked: 679 times | Joined on Feb 2010
#38
nieldk: would it be possible to compile all the prey stuff against openssl-1.0.1f-1.2.1 as installed in 1.0.4.20 by default?
 
Guest | Posts: n/a | Thanked: 0 times | Joined on
#39
Originally Posted by cy8aer View Post
nieldk: would it be possible to compile all the prey stuff against openssl-1.0.1f-1.2.1 as installed in 1.0.4.20 by default?


Yes, no problem.
What needs to be recompiled actually only is perl modules

IO::Socket::SSL and Net::SSLeay

And those you can easy do by using cpan

cpan install IO::Socket::SSL
cpan install Net::SSLeay


allthough, you will need to install development tools to do that.
But, I will compile all during the next days.
 

The Following 3 Users Say Thank You to For This Useful Post:
solbrit's Avatar
Posts: 126 | Thanked: 59 times | Joined on Jan 2011
#40
Here goes, the final update of the UI:

v0.1-4

- Registration output in real time (and possible registration abort)
- Timer state updated and always displayed on main page
- Various fixes (Python mostly) and graphical nick nacks

https://openrepos.net/content/solbrit/preyui

"Final" is ofcourse an optimistic expectation that'll keep me going until the first critical bug is reported
 

The Following 4 Users Say Thank You to solbrit For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 22:20.