summarylogtreecommitdiffstats
path: root/prey-node-client.patch
blob: 79d51515bdd5629ac4dfb619fd0fa9c8d95efce4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
diff --git bin/prey bin/prey
index 5b5203c..915abd7 100755
--- bin/prey
+++ bin/prey
@@ -4,11 +4,11 @@ PATH="$PATH:/usr/local/bin"
 dir="$(dirname $0)"
 [ -x "$dir/node" ] && node="$dir/node" || node="$(command -v node || command -v nodejs)"
 
-# if current file is a symlink (e.g. installed via npm) we'll append
+# if current file is a symlink (e.g. installed via pacman) we'll append
 # the relative path to where the package is actually installed.
 if [ -n "$(readlink $0 2> /dev/null)" ]; then
   rel="$(dirname $(readlink $0))"
-  dir="$dir/$rel"
+  dir="$rel"
 fi
 
 script="lib/agent/cli.js"
diff --git lib/agent/actions/alert/linux/flash.py lib/agent/actions/alert/linux/flash.py
index 38a26b2..e7ac631 100755
--- lib/agent/actions/alert/linux/flash.py
+++ lib/agent/actions/alert/linux/flash.py
@@ -1,10 +1,4 @@
-#!/bin/sh
-''':'
-':'; python=$(command -v python)
-':'; [ -z "$python" ] || [ -n "${python##*usr*}" ] && python="/usr/bin/python"
-':'; exec "$python" "$0" "$@"
-'''
-
+#!/usr/bin/env python2
 # coding: utf8
 
 #############################################
diff --git lib/conf/gui/linux/prey-config.py lib/conf/gui/linux/prey-config.py
index f9f9eb4..66549ef 100755
--- lib/conf/gui/linux/prey-config.py
+++ lib/conf/gui/linux/prey-config.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 ################################################
 # Prey Configurator for Linux
 # By Tomas Pollak
diff --git prey.conf.default prey.conf.default
index 2b2b141..d39a885 100644
--- prey.conf.default
+++ prey.conf.default
@@ -9,7 +9,7 @@ plugin_list = control-panel
 auto_connect = false
 
 # Allows Prey to auto-update itself when new versions are released.
-auto_update = true
+auto_update = false
 
 # Fetch edge releases before they reach the stable branch. No effect without auto_update.
 download_edge = false
diff --git lib/system/linux/index.js lib/system/linux/index.js
index c68f3c2..0d8216d 100644
--- lib/system/linux/index.js
+++ lib/system/linux/index.js_new
@@ -39,6 +39,6 @@ exports.process_running = function(process_name, callback){
 
 // restarts NetworkManager so it reconnects
 exports.reconnect = function(callback){
-  var cmd = "service NetworkManager restart";
+  var cmd = "systemctl restart NetworkManager.service";
   exec(cmd, callback);
 };
diff --git lib/conf/gui/linux/prey-config.py lib/conf/gui/linux/prey-config.py
index 66549ef..a7f4730 100755
--- lib/conf/gui/linux/prey-config.py
+++ lib/conf/gui/linux/prey-config.py
@@ -44,7 +44,7 @@ OUT = STDOUT # None
 
 SCRIPT_PATH = os.sys.path[0]
 PACKAGE_PATH = SCRIPT_PATH + '/../../../..'
-PREY_BIN = PACKAGE_PATH + '/bin/prey'
+PREY_BIN = PACKAGE_PATH + '/bin/prey_project'
 PREY_CONFIG = PREY_BIN + ' config'
 
 PACKAGE_JSON = open(PACKAGE_PATH + '/package.json', 'r')

diff --git lib/conf/shared/messages.js lib/conf/shared/messages.js
index 55bc13c..a30ab1a 100644
--- lib/conf/shared/messages.js
+++ lib/conf/shared/messages.js
@@ -1,5 +1,5 @@
 module.exports = {
-  no_config: "Config file not found! Please run bin/prey config activate.",
+  no_config: "Config file not found! Please run bin/prey_project config activate.",
   no_perms: "Oops. Seems you don't have write permissions. Try running with sudo.",
   ssl_keygen_error: "Unable to generate SSL keys:",
   ssl_keygen_success: "SSL keys in place!",
@@ -8,7 +8,7 @@ module.exports = {
   first_run: 'Running Prey for the first time...',
   first_run_error: "Shoot, something went wrong. Try running Prey again to see what's going on.",
   first_run_ok: "Done! You can now close this window.\n",
-  try_console: "Or if you wish to play around with Prey, try the console mode: \n\n\t $ prey -d console\n",
+  try_console: "Or if you wish to play around with Prey, try the console mode: \n\n\t $ prey_project -d console\n",
   maybe_next_time: "Ok maybe next time. Farewell!",
   error_creating_log_file: "Couldn't create log file in ",
   error_storing_values: "Could not store config values: ",
diff --git lib/conf/shared/keys.js lib/conf/shared/keys.js
index 95a77b9..fdec9d1 100644
--- lib/conf/shared/keys.js
+++ lib/conf/shared/keys.js
@@ -56,7 +56,7 @@ exports.verify_current = function(cb) {
   if (!keys.api)
     return cb(new Error('API Key not found!'))
   else if (!keys.device)
-    return cb(new Error('Device Key not found! Run `bin/prey` to get your device linked.'))
+    return cb(new Error('Device Key not found! Run `bin/prey_project` to get your device linked.'))
 
   panel.verify_keys(keys, cb);
 }
diff --git lib/agent/plugins/console/index.js lib/agent/plugins/console/index.js
index 9448533..7f5afb0 100644
--- lib/agent/plugins/console/index.js
+++ lib/agent/plugins/console/index.js
@@ -119,7 +119,7 @@ var load_hooks = function() {
 };
 
 exports.enabled = function(cb) {
-  cb(new Error('This plugin is not used this way. To use it, run `bin/prey console`.'));
+  cb(new Error('This plugin is not used this way. To use it, run `bin/prey_project console`.'));
 }
 
 var unload = function(err) {
  
 }
 
 
 
diff --git package.json package.json
index 8383b5d..697816b 100644
--- package.json
+++ package.json
@@ -81,7 +81,7 @@
   },
   "main": "./lib/common",
   "bin": {
-    "prey": "./bin/prey"
+    "prey": "./bin/prey_project"
   },
   "directories": {
     "bin": "./bin",
@@ -90,12 +90,12 @@
     "test": "./test"
   },
   "scripts": {
-    "start": "./bin/prey",
-    "test": "./bin/prey test lib/agent/plugins test --recursive --reporter dot",
+    "start": "./bin/prey_project",
+    "test": "./bin/prey_project test lib/agent/plugins test --recursive --reporter dot",
     "coverage": "istanbul cover _mocha -- lib/agent/plugins test --recursive",
-    "postinstall": "./bin/prey config hooks post_install",
-    "postupdate": "./bin/prey config hooks post_install",
-    "preuninstall": "./bin/prey config hooks pre_uninstall"
+    "postinstall": "./bin/prey_project config hooks post_install",
+    "postupdate": "./bin/prey_project config hooks post_install",
+    "preuninstall": "./bin/prey_project config hooks pre_uninstall"
   },
   "bugs": {
     "url": "http://github.com/prey/prey-node-client/issues"