Skip to content

Commit

Permalink
latest
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee Driscoll committed Jun 27, 2017
1 parent a8c50b9 commit 77b5567
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const http = require('http')
import { HOSTS } from './config'

const hostnames = [
'127.0.0.1',
Expand Down
11 changes: 9 additions & 2 deletions bin/network-up
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/bin/bash

ifconfig lo0 alias 127.0.0.2 up
ifconfig lo0 alias 127.0.0.3 up
TEST1=`ifconfig -uv "lo0" | grep "127.0.0.2"`
TEST2=`ifconfig -uv "lo0" | grep "127.0.0.3"`

if [[ -z ${TEST1} && -z ${TEST2} ]]; then
ifconfig lo0 alias 127.0.0.2 up && echo 127.0.0.2 is up
ifconfig lo0 alias 127.0.0.3 up && echo 127.0.0.3 is up
fi

exit 0
7 changes: 7 additions & 0 deletions config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default {
HOSTS: [
'127.0.0.2',
'127.0.0.3',
'127.0.0.4'
]
}

0 comments on commit 77b5567

Please sign in to comment.