From 76fa47f5d0e118d3ba19b9bf4edb33a8270b7afc Mon Sep 17 00:00:00 2001 From: DJ Lucas Date: Mon, 10 Jan 2022 00:16:47 -0600 Subject: [PATCH] Don't install systemd timers on non-systemd Fixes #18 --- Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index b93b209..e357638 100644 --- a/Makefile +++ b/Makefile @@ -34,12 +34,14 @@ install_cs: install -vm644 CS.txt $(DESTDIR)$(ETCDIR) install_systemd: - if test -d /usr/lib/systemd/system; then \ - install -vdm755 ${DESTDIR}/usr/lib/systemd/system; \ - install -vm644 systemd/* $(DESTDIR)/usr/lib/systemd/system; \ - elif test -d /lib/systemd/system; then \ - install -vdm755 ${DESTDIR}/lib/systemd/system; \ - install -vm644 systemd/* ${DESTDIR}/lib/systemd/system; \ + if test -x /usr/sbin/systemctl -o -x /usr/bin/systemctl; then \ + if test -d /usr/lib/systemd/system; then \ + install -vdm755 ${DESTDIR}/usr/lib/systemd/system; \ + install -vm644 systemd/* $(DESTDIR)/usr/lib/systemd/system; \ + elif test -d /lib/systemd/system; then \ + install -vdm755 ${DESTDIR}/lib/systemd/system; \ + install -vm644 systemd/* ${DESTDIR}/lib/systemd/system; \ + fi; \ fi install_man: man