Skip to content

Commit

Permalink
Review feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwilkie committed Feb 4, 2016
1 parent 76080c1 commit 34ca87c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ the Internet. Additionally traffic between the app and the probe is currently
insecure and should not traverse the internet.

Scope will periodically check with our servers to see if a new version is
availible. To disable this, run:
available. To disable this, run:

```
CHECKPOINT_DISABLE=true scope launch
Expand Down
7 changes: 3 additions & 4 deletions prog/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,13 @@ func appMain() {
defer log.Print("app exiting")

// Start background version checking
params := checkpoint.CheckParams{
checkpoint.CheckInterval(&checkpoint.CheckParams{
Product: "scope-app",
Version: app.Version,
SignatureFile: signatureFile,
}
checkpoint.CheckInterval(&params, versionCheckPeriod, func(r *checkpoint.CheckResponse, err error) {
}, versionCheckPeriod, func(r *checkpoint.CheckResponse, err error) {
if r.Outdated {
log.Printf("Scope version %s is availible; please update at %s",
log.Printf("Scope version %s is available; please update at %s",
r.CurrentVersion, r.CurrentDownloadURL)
}
})
Expand Down
2 changes: 1 addition & 1 deletion prog/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (

const (
signatureFile = "/etc/weave/signature"
versionCheckPeriod = 6 * 60 * time.Minute
versionCheckPeriod = 6 * time.Hour
)

func check() {
Expand Down
6 changes: 5 additions & 1 deletion scope
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,13 @@ check_not_running() {
}

launch_command() {
local args="-v /etc/weave:/etc/weave"
if (set +u; [ -n "$CHECKPOINT_DISABLE" ]); then
args=
fi
echo docker run --privileged -d --name=$SCOPE_CONTAINER_NAME --net=host --pid=host \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /etc/weave:/etc/weave \
$args \
-e CHECKPOINT_DISABLE \
$WEAVESCOPE_DOCKER_ARGS $SCOPE_IMAGE --probe.docker true "$@"
}
Expand Down

0 comments on commit 34ca87c

Please sign in to comment.