Fixing build issues
This commit is contained in:
parent
bc3193009f
commit
fcee078c0b
1
Makefile
1
Makefile
|
@ -15,6 +15,7 @@ install:
|
|||
mkdir -p ~/.mumbledj/web
|
||||
if [ -a ~/.mumbledj/config/mumbledj.gcfg ]; then mv ~/.mumbledj/config/mumbledj.gcfg ~/.mumbledj/config/mumbledj_backup.gcfg; fi;
|
||||
cp -u config.gcfg ~/.mumbledj/config/mumbledj.gcfg
|
||||
cp -u index.html ~/.mumbledj/web/index.html
|
||||
if [ -d ~/bin ]; then cp -f mumbledj* ~/bin/mumbledj; else sudo cp -f mumbledj* /usr/local/bin/mumbledj; fi;
|
||||
|
||||
build:
|
||||
|
|
4
web.go
4
web.go
|
@ -49,12 +49,12 @@ func (web *WebServer) homepage(w http.ResponseWriter, r *http.Request) {
|
|||
if uname == nil {
|
||||
fmt.Fprintf(w, "Invalid Token")
|
||||
} else {
|
||||
t, err := template.ParseFiles("index.html")
|
||||
t, err := template.ParseFiles("~/.mumbledj/web/index.html")
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
err = t.Execute(w, &Page{"http://" + getIP() + ":" + strconv.Itoa(web.port) + "/", r.URL.Path[1:]})
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
|
|
Reference in a new issue