From 366e740c8d1b16812638be0f45509d6c64c634a8 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 5 Feb 2017 00:11:26 -0500 Subject: Makefile: fix systemd unit installation, bump version; fix .gitignore --- .gitignore | 1 + Makefile | 18 ++++++++++-------- parabolaweb-reporead-rsync.timer | 8 ++++++++ 3 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 parabolaweb-reporead-rsync.timer diff --git a/.gitignore b/.gitignore index 8bee403..69423a9 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ parabolaweb* !parabolaweb*.c !parabolaweb.conf !parabolaweb.ini +!parabolaweb*.timer .tmp.* .var.* diff --git a/Makefile b/Makefile index c4bea3b..fe07ceb 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,17 @@ PACKAGE = parabolaweb-utils -VERSION = 20170204 +VERSION = 20170205 -#prefix = /usr/local +# override gnuconf defaults prefix = /usr -#sbindir = $(exec_prefix)/sbin sbindir = $(bindir) -#libexecdir = $(exec_prefix)/libexec libexecdir = $(exec_prefix)/lib -#sysconfdir = $(prefix)/etc sysconfdir = /etc/conf.d -#uwsgidir = $(prefix)/etc/uwsgi -uwsgidir = /etc/uwsgi +# non-standard directories +systemddir = $(prefix)/lib/systemd/system +uwsgidir = /etc/uwsgi pkglibexecdir = $(libexecdir)/parabolaweb-utils -pkgconffile = $(sysconfdir)/parabolaweb +pkgconffile = $(sysconfdir)/parabolaweb CFLAGS += -std=c99 -Wall -Wextra -Werror -Wno-unused-parameter CPPFLAGS += -DSCRIPT_LOCATION='"$(pkglibexecdir)/parabolaweb-changepassword.real"' @@ -30,6 +28,7 @@ targets = \ $(pkglibexecdir)/parabolaweb-changepassword.real \ $(systemddir)/parabolaweb-reporead-inotify.service \ $(systemddir)/parabolaweb-reporead-rsync.service \ + $(systemddir)/parabolaweb-reporead-rsync.timer \ $(uwsgidir)/parabolaweb.ini files.out.all = depends.txt $(filter-out $(files.src.src),$(notdir $(targets))) parabolaweb.conf @@ -49,6 +48,9 @@ $(DESTDIR)$(pkglibexecdir)/%: % $(DESTDIR)$(systemddir)/%.service: %.service install -Dm644 $< $@ +$(DESTDIR)$(systemddir)/%.timer: %.timer + install -Dm644 $< $@ + $(DESTDIR)$(uwsgidir)/%: % install -Dm644 $< $@ diff --git a/parabolaweb-reporead-rsync.timer b/parabolaweb-reporead-rsync.timer new file mode 100644 index 0000000..338a192 --- /dev/null +++ b/parabolaweb-reporead-rsync.timer @@ -0,0 +1,8 @@ +[Unit] +Description=ParabolaWeb reporead batch job + +[Timer] +OnUnitInactiveSec=10m + +[Install] +WantedBy=multi-user.target -- cgit v1.2.3