diff options
-rwxr-xr-x | host-control | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/host-control b/host-control index b4c1e9b..4fb6014 100755 --- a/host-control +++ b/host-control @@ -335,13 +335,12 @@ class host_control(): self.print_message("No " + name + " unit in host: " + self.host) return 1 - if not "systemd-unit" in unit: - return 1 - if "log-path" in unit: arguments = [ "tail", "-n", "50", "-f", unit["log-path"] ] - else: + elif "systemd-unit" in unit: arguments = [ "journalctl", "-n", "50", "-fu", unit["systemd-unit"] ] + else: + return 1 self.host_call(host, arguments) |