Skip to content

Commit

Permalink
Adding Method to try and install Wireguard snap if needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
bmcgonag committed Nov 25, 2019
1 parent 17e56cd commit e18ce8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ Meteor.methods({
let mpw = Control.findOne({}).mpw;
let installed = WGInstalled.findOne({});

console.log("mpw: " + mpw);

ShellJS.exec("umask 077");
ShellJS.exec("wg genkey | tee ~/privatekey | wg pubkey > ~/publickey");
let privKey = ShellJS.exec("cat ~/privatekey");
Expand Down Expand Up @@ -110,6 +108,8 @@ Meteor.methods({
},
"install.wg" () {
// we will attempt to install wireguard using a snap isntall first.
let mpw = Control.findOne({}).mpw;

return ShellJS.exec("echo " + mpw + " | sudo -S snap install wireguard-ammp");
},
});

0 comments on commit e18ce8a

Please sign in to comment.