kopia lustrzana https://github.com/cyoung/stratux
Write only a single file for updates - fixes reboot loop issues.
Files with spaces and special characters were causing reboot loops.pull/472/merge
rodzic
84e3497da5
commit
0177402f00
|
@ -311,7 +311,7 @@ func handleUpdatePostRequest(w http.ResponseWriter, r *http.Request) {
|
|||
w.WriteHeader(404)
|
||||
return
|
||||
}
|
||||
updateFile := fmt.Sprintf("/root/%s", handler.Filename)
|
||||
updateFile := fmt.Sprintf("/root/update-stratux-v.sh")
|
||||
f, err := os.OpenFile(updateFile, os.O_WRONLY|os.O_CREATE, 0666)
|
||||
if err != nil {
|
||||
log.Printf("Update failed from %s (%s).\n", r.RemoteAddr, err.Error())
|
||||
|
|
Ładowanie…
Reference in New Issue