Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds prey-user v0.0.3 as a universal binary #747

Merged
merged 3 commits into from
Apr 5, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified bin/prey-user
Binary file not shown.
9 changes: 4 additions & 5 deletions lib/conf/tasks/prey_owl.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ const compareVersionsDaemon = (preyUserOldVersion, preyUserVersion, cb) => {
const testExistingConfigurations = (cb) => {
const newPath = path_launch_daemon + new_watcher_key + '.plist';
const oldPath = path_launch_daemon + old_watcher_key + '.plist';
const current_path_prey_user = join(paths.current, 'bin', 'prey-user');
const install_versions_path = join(`${paths.install}`, 'versions', 'prey-user');

exec(`test -f ${newPath} && echo exists`, (error, stdout) => {
if (stdout) {
Expand All @@ -137,11 +139,8 @@ const testExistingConfigurations = (cb) => {
return cb && cb(err);
});
});
exec(`rm -fr ${join(`${install_versions_path}`, 'prey-user')}`, (err) => {
console.log(`${err}`);
exec(`/bin/cp ${current_path_prey_user} ${install_versions_path}`, (err2) => {
console.log(`${err2}`);
});
exec(`/bin/cp ${current_path_prey_user} ${install_versions_path}`, (err_copy) => {
logger.error(`Error when copying new file from ${current_path_prey_user} to ${install_versions_path}: ${err_copy}`);
});
} else {
activeWatcher(cb);
Expand Down