maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   [WIP] Prey - antitheft system (https://talk.maemo.org/showthread.php?t=92829)

nieldk 2015-03-07 18:53

Re: [WIP] Prey - antitheft system
 
Yes. It seems slow on updating.
you can see in terminal if it got posted.


info Sat, 07 Mar 2015 18:49:13 GMT [reports] Report gathered: status
info Sat, 07 Mar 2015 18:49:13 GMT [control-panel] Posting data
info Sat, 07 Mar 2015 18:49:14 GMT [control-panel] Got 200 response: OK

nieldk 2015-03-07 19:10

Re: [WIP] Prey - antitheft system
 
Now. Create a system service
$ devel-su
# nano -w /etc/systemd/system/prey-agent.service

[Unit]
Description=The Prey daemon.
After=network.target
[Service]
ExecStart=/usr/lib/node_modules/prey/bin/prey
WorkingDirectory=/usr/lib/node_modules/prey
Restart=always
RestartSec=15
User=prey
Environment="TERM=dumb" "USER=prey"
KillMode=process
TimeoutStopSec=20
KillSignal=QUIT
[Install]
WantedBy=multi-user.target

And start it
# systemctl start prey-agent

Enable it on boot
# systemctl enable prey-agent

Victorious 2015-03-07 19:11

Re: [WIP] Prey - antitheft system
 
It works now :).

Victorious 2015-03-07 19:22

Re: [WIP] Prey - antitheft system
 
[nemo@Jolla ~]$ devel-su
Password:
[root@Jolla nemo]# systemctl start prey-agent
Warning: Unit file of prey-agent.service changed on disk, 'systemctl daemon-reload' recommended.
[root@Jolla nemo]# systemctl enable prey-agent
[root@Jolla nemo]#

nieldk 2015-03-07 19:53

Re: [WIP] Prey - antitheft system
 
Wonderful!

A lot is missing still.
But, most important is location tracking.
So. I can move on and create a first Alpha package for openrepos :)

Thanks again buddy for helping.

Also. Thank prey guys for making the changes to recignize Jolla on their side.

Victorious 2015-03-07 20:07

Re: [WIP] Prey - antitheft system
 
After rebooting the phone - 10 seconds Prey found my phone and accurately (+ - 5 meters) showed my location! Nothing in the terminal I typed ...

nieldk 2015-03-07 20:16

Re: [WIP] Prey - antitheft system
 
That was the purpose of creating the prey-agent.service ;)

Now. When you set it to missing, you should get a report by email.
Containing
Location
Hardware info
Ip adress
Wifi networks around
And timestamps

Victorious 2015-03-07 20:35

Re: [WIP] Prey - antitheft system
 
Quote:

Originally Posted by nieldk (Post 1463385)
That was the purpose of creating the prey-agent.service ;)

Now. When you set it to missing, you should get a report by email.
Containing
Location
Hardware info
Ip adress
Wifi networks around
And timestamps

Yes, I got all this information! But I disabled "Set device to messing" and after a reboot it immediately shows the location. Five times restarts. I just cant find setting "Report frequency".

nieldk 2015-03-07 20:40

Re: [WIP] Prey - antitheft system
 
Not sure what you are asking ?
It definately is supposed to show you location.

Set device to missing is for mailing the report, once the device is located.

Victorious 2015-03-07 20:42

Re: [WIP] Prey - antitheft system
 
Quote:

Originally Posted by nieldk (Post 1463350)
This should show on panel.preyproject.com now
Until I create a full package, with a systemd service, prey will need to be running in terminal

It is not mandatory - and all so perfectly works!


All times are GMT. The time now is 17:27.

vBulletin® Version 3.8.8