agregando case
This commit is contained in:
+5
-4
@@ -86,22 +86,23 @@ func telegramBot(botToken string, chatID int64) {
|
||||
}
|
||||
|
||||
func umount(h HostInfo) string {
|
||||
if h.hostname == "alfa" {
|
||||
switch h.hostname {
|
||||
case "alfa":
|
||||
cmd := exec.Command("umount", "/home/kar/pelis/pelis")
|
||||
output, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
return string(output)
|
||||
} else if h.hostname == "jellyfin" {
|
||||
case "jellyfin":
|
||||
cmd := exec.Command("umount", "/mnt/pelis")
|
||||
output, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
return string(output)
|
||||
}
|
||||
}
|
||||
return "Error"
|
||||
return "error"
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user