From d84954333363811ef81f5cdd0c5c3051738ba372 Mon Sep 17 00:00:00 2001 From: Bert Gijsbers Date: Wed, 10 Jan 2024 21:24:39 +0100 Subject: [PATCH] Add shutdown command for BSD and closes #761. --- src/default.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/default.h b/src/default.h index 083bfdd50..2ff05895d 100644 --- a/src/default.h +++ b/src/default.h @@ -193,6 +193,11 @@ XSV(const char *, shutdownCommand, "test -e /run/systemd/system && XSV(const char *, rebootCommand, "test -e /run/systemd/system && systemctl reboot || loginctl reboot") XSV(const char *, suspendCommand, "test -e /run/systemd/system && systemctl suspend || loginctl suspend") XSV(const char *, hibernateCommand, "test -e /run/systemd/system && systemctl hibernate || loginctl hibernate") +#elif __OpenBSD__ || __NetBSD__ || __FreeBSD__ +XSV(const char *, shutdownCommand, "shutdown -p now") +XSV(const char *, rebootCommand, "shutdown -r now") +XSV(const char *, suspendCommand, "zzz") +XSV(const char *, hibernateCommand, 0) #else XSV(const char *, shutdownCommand, 0) XSV(const char *, rebootCommand, 0)