mirror of
https://github.com/micromdm/micromdm/
synced 2026-08-13 05:45:41 +08:00
Add validation that filerepo path exists (#139)
This commit is contained in:
committed by
Victor Vrantchan
parent
90ab393742
commit
1c190f0efe
5
serve.go
5
serve.go
@@ -221,6 +221,9 @@ func serve(args []string) error {
|
||||
}
|
||||
|
||||
if *flRepoPath != "" {
|
||||
if _, err := os.Stat(*flRepoPath); os.IsNotExist(err) {
|
||||
stdlog.Fatal(err)
|
||||
}
|
||||
r.PathPrefix("/repo/").Handler(http.StripPrefix("/repo/", http.FileServer(http.Dir(*flRepoPath))))
|
||||
}
|
||||
|
||||
@@ -292,7 +295,7 @@ func printExamples() {
|
||||
const exampleText = `
|
||||
Quickstart:
|
||||
sudo micromdm serve -apns-cert /path/to/mdm_push_cert.p12 -apns-password=password_for_p12 -server-url=https://my-server-url
|
||||
|
||||
|
||||
Using self-signed certs:
|
||||
*Note, -apns flags are still required!*
|
||||
sudo micromdm serve -tls-cert=/path/to/server.crt -tls-key=/path/to/server.key
|
||||
|
||||
Reference in New Issue
Block a user