agregando case

This commit is contained in:
kar
2025-10-13 20:25:44 -06:00
parent 7749800e1e
commit 366ae7b611
+6 -5
View File
@@ -86,22 +86,23 @@ func telegramBot(botToken string, chatID int64) {
} }
func umount(h HostInfo) string { func umount(h HostInfo) string {
if h.hostname == "alfa" { switch h.hostname {
case "alfa":
cmd := exec.Command("umount", "/home/kar/pelis/pelis") cmd := exec.Command("umount", "/home/kar/pelis/pelis")
output, err := cmd.CombinedOutput() output, err := cmd.CombinedOutput()
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
} }
return string(output) return string(output)
} else if h.hostname == "jellyfin" { case "jellyfin":
cmd := exec.Command("umount", "/mnt/pelis") cmd := exec.Command("umount", "/mnt/pelis")
output, err := cmd.CombinedOutput() output, err := cmd.CombinedOutput()
if err != nil { if err != nil {
log.Fatal(err) log.Fatal(err)
return string(output)
} }
} return string(output)
return "Error" }
return "error"
} }