File tree Expand file tree Collapse file tree 5 files changed +20
-6
lines changed Expand file tree Collapse file tree 5 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,7 @@ func (c *Client) start() {
142
142
}
143
143
if connerr != nil {
144
144
d := b .Duration ()
145
+ c .Debugf ("Error connecting: %s" , connerr )
145
146
c .Infof ("Retrying in %s...\n " , d )
146
147
connerr = nil
147
148
time .Sleep (d )
Original file line number Diff line number Diff line change 2
2
# Stop processing on error
3
3
set -e
4
4
5
+ echo Current environment
6
+ env
7
+
5
8
echo Configuring container
6
9
mkdir -p etc var/run
7
10
@@ -45,5 +48,5 @@ $(pwd)/openssh-portable/sshd -f etc/sshd_config
45
48
# echo "$PASS" | passwd
46
49
47
50
# Start the webserver immediately; this prevents Cloud Foundry from killing this container
48
- ./bin/chisel server --proxy http://example.com --port $PORT
51
+ ./bin/chisel server -v --port $PORT $SERVER_ARGS
49
52
Original file line number Diff line number Diff line change @@ -5,6 +5,15 @@ set -e # exit on error
5
5
cd ` dirname $0 `
6
6
source .default.sh
7
7
8
+ # Always start a build
9
+ GOPATH=$( cd ../../../..; pwd) go build &
10
+
11
+ # Were we called by ./tunnel?
12
+ if [ " $1 " == -t ]; then
13
+ tunnel=yes
14
+ shift
15
+ fi
16
+
8
17
# See if we're already running...
9
18
echo " Checking if $CHISEL_APP_NAME is running"
10
19
set +e
@@ -33,6 +42,7 @@ if [ $rc -ne 0 ]; then
33
42
else
34
43
if echo " $out " | grep -q running; then
35
44
echo " $CHISEL_APP_NAME is running; skipping push."
45
+ wait # Make sure build is done
36
46
exit
37
47
fi
38
48
fi
66
76
67
77
echo " pushing $CHISEL_APP_NAME to cloud foundry"
68
78
69
- cf push -t 180 $@ " $CHISEL_APP_NAME " & # -t: maximum number of seconds to wait for app to start
70
-
71
- GOPATH=$( cd ../../../..; pwd) go build
79
+ cf push -t 180 $@ " $CHISEL_APP_NAME " # -t: maximum number of seconds to wait for app to start
72
80
73
81
wait
74
82
75
- ./tunnel
83
+ # If we weren't started by tunnel, run ./tunnel
84
+ [ -n " $tunnel " ] || ./tunnel
76
85
77
86
# vi: expandtab sw=2 ts=2
Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ func (s *Server) Run(host, port string) error {
97
97
}
98
98
99
99
func (s * Server ) Start (host , port string ) error {
100
+ s .Debugf ("Debug enabled" )
100
101
s .Infof ("Fingerprint %s" , s .fingerprint )
101
102
if len (s .Users ) > 0 {
102
103
s .Infof ("User authenication enabled" )
Original file line number Diff line number Diff line change 39
39
echo " Starting $CHISEL_APP_NAME forwarding local port $CHISEL_LOCAL_PORT to remote port $CHISEL_REMOTE_PORT "
40
40
41
41
# Make sure that app is running
42
- ./push.sh $@
42
+ ./push.sh -t $@
43
43
44
44
echo " Obtaining url for $CHISEL_APP_NAME "
45
45
url=` cf app $CHISEL_APP_NAME | egrep ' routes|urls' | awk ' {print $2}' `
You can’t perform that action at this time.
0 commit comments