Skip to content

Commit

Permalink
film demo
Browse files Browse the repository at this point in the history
  • Loading branch information
yzp0n committed May 3, 2020
1 parent 07b9c0f commit a8dd10f
Show file tree
Hide file tree
Showing 5 changed files with 389 additions and 1 deletion.
367 changes: 367 additions & 0 deletions docs/demo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (s *Storage) mkdirIfNeeded() error {

func (s *Storage) GeoIpCachePath() string {
_ = s.mkdirIfNeeded()
return filepath.Join(s.BaseDir, "geoip_cache.yaml")
return filepath.Join(s.BaseDir, "geoip_cache.json")
}

type Profile struct {
Expand Down
14 changes: 14 additions & 0 deletions tools/demoenv/bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
export LANG=en_US.UTF-8
export HOSTNAME=demohost

PS1="$ "

export PATH="$(pwd)/../..:$PATH"

rm -rf /tmp/kmgmdemo
export KMGMDIR=/tmp/kmgmdemo/.config/kmgm
mkdir -p $KMGMDIR
echo '{"city":"Bunkyo","country":"Japan","countryCode":"JP","regionName":"Tokyo","timezone":"Asia/Tokyo"}' > $KMGMDIR/geoip_cache.json

export KMGM_DEFAULT_NAMES="demohost,demohost.example,192.168.0.10"
cd /tmp/kmgmdemo
5 changes: 5 additions & 0 deletions tools/demoenv/demoenv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
cd $(dirname $0)
mkdir -p /tmp/kmgmdemo/.config/kmgm

termtosvg -t window_frame_js -g 120x30 -c ./sh_wrap.sh
2 changes: 2 additions & 0 deletions tools/demoenv/sh_wrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
exec bash --rcfile bashrc

0 comments on commit a8dd10f

Please sign in to comment.