-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.sh
49 lines (44 loc) · 1.1 KB
/
config.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#/bin/bash
#retrieve variables from vars.sh
source ./vars.sh
set -e
echo "using Tile Server: $TILESERVER"
echo "attribution: $ATTRIBUTION"
cat <<HERE >/usr/share/nginx/html/index.html
<!DOCTYPE html>
<html>
<head>
<title>${TITLE}</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.css" />
<style>
body {
padding: 0px;
margin: 0px;
height: 100%;
width: 100%;
}
#map {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script src="//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/zepto/1.1.4/zepto.min.js"></script>
<script src="autosize.js"></script>
<script>
Autosize.enable();
var map = L.map('map').setView([${DEFAULT_LAT}, ${DEFAULT_LON}], ${DEFAULT_SCALE});
L.tileLayer('${TILESERVER}', {
attribution: '${ATTRIBUTION}'
})
.addTo(map);
</script>
</body>
</html>
HERE
nginx -g "daemon off;"