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/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"