summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-02-05 00:11:26 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-02-05 00:29:21 -0500
commit366e740c8d1b16812638be0f45509d6c64c634a8 (patch)
treeb57a423b01a7bcc080508e251916d98736587b79
parent65447bb0880b38e00b1f19c3c0ea0d03e4f2cf7a (diff)
Makefile: fix systemd unit installation, bump version; fix .gitignorev20170205
-rw-r--r--.gitignore1
-rw-r--r--Makefile18
-rw-r--r--parabolaweb-reporead-rsync.timer8
3 files changed, 19 insertions, 8 deletions
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