Skip to content

Commit

Permalink
Add shutdown command for BSD and closes #761.
Browse files Browse the repository at this point in the history
  • Loading branch information
gijsbers committed Jan 10, 2024
1 parent 7c432f9 commit d849543
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/default.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d849543

Please sign in to comment.