begin install script

This commit is contained in:
AJ ONeal 2018-04-24 16:34:51 +00:00
parent 6b25c7e1f5
commit 4a2199dc71
2 changed files with 17 additions and 0 deletions

4
bin/generate-secret.js Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env node
'use strict'
console.log(require('crypto').randomBytes(16).toString('hex'));

View File

@ -0,0 +1,13 @@
#!/bin/bash
rm -rf ./node-installer.sh
curl -fsSL bit.ly/node-installer -o ./node-installer.sh
bash ./node-installer.sh --dev-deps
git clone https://git.coolaj86.com/coolaj86/tunnel-server.js.git
pushd tunnel-server.js/
npm install
my_secret=$(node bin/generate-secret.js)
echo "Your secret is:\n\n\t"$my_secret
echo "node bin/server.js --servernames tunnel.example.com --secret $my_secret"
popd