kopia lustrzana https://github.com/cyoung/stratux
Roll back webserver, use Go as webserver.
rodzic
e98d55d8d7
commit
bcf7bbb053
|
@ -38,13 +38,6 @@ echo "**** STRATUX SETUP *****"
|
|||
|
||||
ssh_in_to_qemu chroot /mnt sh -l -ex - <<\EOF
|
||||
|
||||
#http server
|
||||
apt-get install -y lighttpd
|
||||
ln -s /var/log /var/www/logs
|
||||
echo 'dir-listing.activate = "enable"' >> /etc/lighttpd/lighttpd.conf
|
||||
echo 'server.follow-symlink = "enable"' >> /etc/lighttpd/lighttpd.conf
|
||||
update-rc.d lighttpd enable
|
||||
|
||||
#wifi
|
||||
apt-get install -y hostapd isc-dhcp-server
|
||||
#troubleshooting
|
||||
|
|
|
@ -271,7 +271,8 @@ func delayReboot() {
|
|||
|
||||
// Upload an update file.
|
||||
func handleUpdatePostRequest(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
setNoCache(w)
|
||||
setJSONHeaders(w)
|
||||
r.ParseMultipartForm(1024 * 1024 * 32) // ~32MB update.
|
||||
file, handler, err := r.FormFile("update_file")
|
||||
if err != nil {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// application constants
|
||||
var URL_HOST_BASE = window.location.hostname+":8080";
|
||||
var URL_HOST_BASE = window.location.hostname;
|
||||
var URL_SETTINGS_GET = "http://" + URL_HOST_BASE + "/getSettings";
|
||||
var URL_SETTINGS_SET = "http://" + URL_HOST_BASE + "/setSettings";
|
||||
var URL_GPS_GET = "http://" + URL_HOST_BASE + "/getSituation";
|
||||
|
|
Ładowanie…
Reference in New Issue