From e18ce8a87965d190a2493607fdca1c4016cdec3b Mon Sep 17 00:00:00 2001 From: bmcgonag Date: Mon, 25 Nov 2019 13:21:31 -0600 Subject: [PATCH] Adding Method to try and install Wireguard snap if needed. --- server/methods.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/methods.js b/server/methods.js index 23621b3..8815d87 100644 --- a/server/methods.js +++ b/server/methods.js @@ -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"); @@ -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"); }, }); \ No newline at end of file