Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autogenerate journal-triggerd.service (and fix a bashism) #8

Open
wants to merge 2 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ configure
libtool
journal-triggerd
journal-triggerd.1
journal-triggerd.service
index.html
stamp-h1
13 changes: 11 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
DISTCLEANFILES = \
journal-triggerd.1 \
journal-triggerd.service \
index.html

ACLOCAL_AMFLAGS = -I m4
Expand Down Expand Up @@ -34,10 +35,11 @@ dist_doc_DATA = index.html \
COPYING \
README.md

dist_service_DATA = journal-triggerd.service
service_DATA = journal-triggerd.service

EXTRA_DIST = \
journal-triggerd.pod
journal-triggerd.pod \
journal-triggerd.service.in

journal-triggerd.1: journal-triggerd.pod
$(AM_V_GEN)pod2man --center='Runs trigger on journal messages' --section=1 \
Expand All @@ -50,3 +52,10 @@ install-data-hook:
$(MKDIR_P) "$(DESTDIR)$(docdir)/html"
mv "$(DESTDIR)$(docdir)/index.html" "$(DESTDIR)$(docdir)/html/"
$(MKDIR_P) "$(DESTDIR)$(rulesdir)"

journal-triggerd.service: $(srcdir)/journal-triggerd.service.in Makefile
rm -f $@ [email protected]
srcdir=''; \
test -f ./[email protected] || srcdir=$(srcdir)/; \
sed -e 's|@bindir[@]|$(bindir)|g' $${srcdir}[email protected] >[email protected]
mv [email protected] $@
4 changes: 2 additions & 2 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@

LOG=autogen.log

function abort()
abort()
{
echo "An error occured, the output below can be found in $LOG"
echo "-------"
cat $LOG
exit 1
}

function run()
run()
{
echo -n "Running \"$@\" ... "
echo "$ $@" >>$LOG
Expand Down
2 changes: 1 addition & 1 deletion journal-triggerd.service → journal-triggerd.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Description=Triggers on journal messages
After=systemd-journald.service

[Service]
ExecStart=/usr/bin/journal-triggerd
ExecStart=@bindir@/journal-triggerd

[Install]
WantedBy=multi-user.target