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

[systemd] Add delay.timer #612

Open
wants to merge 3 commits into
base: master
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
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ BINDIR = $(PREFIX)/bin
DOCDIR = $(PREFIX)/share/doc/$(PN)
SCRIPTDIR = $(PREFIX)/share/$(PN)/scripts
SYSTEMDDIR = $(PREFIX)/lib/systemd/system
TIMERCONF = $(CONFDIR)/systemd/system
BASHCOMPDIR = $(PREFIX)/share/bash-completion/completions
MAN1DIR = $(PREFIX)/share/man/man1
MAN5DIR = $(PREFIX)/share/man/man5
Expand All @@ -44,6 +45,7 @@ replace_vars = sed \
-e "s|@DOCDIR@|$(DOCDIR)|g" \
-e "s|@SCRIPTDIR@|$(SCRIPTDIR)|g" \
-e "s|@SYSTEMDDIR@|$(SYSTEMDDIR)|g" \
-e "s|@TIMERCONF@|$(TIMERCONF)|g" \
-e "s|@BASHCOMPDIR@|$(BASHCOMPDIR)|g" \
-e "s|@MAN1DIR@|$(MAN1DIR)|g" \
-e "s|@MAN5DIR@|$(MAN5DIR)|g"
Expand Down Expand Up @@ -79,12 +81,16 @@ install-completion:
install-systemd:
@echo 'installing systemd service units...'
install -d -m 755 "$(DESTDIR)$(SYSTEMDDIR)"
install -d -m 755 "$(DESTDIR)$(TIMERCONF)/btrbk.timer.d"
$(replace_vars) contrib/systemd/btrbk.service.in > contrib/systemd/btrbk.service.tmp
$(replace_vars) contrib/systemd/btrbk.timer.in > contrib/systemd/btrbk.timer.tmp
$(replace_vars) contrib/systemd/delay.timer.in > contrib/systemd/delay.timer.tmp
install -p -m 644 contrib/systemd/btrbk.service.tmp "$(DESTDIR)$(SYSTEMDDIR)/btrbk.service"
install -p -m 644 contrib/systemd/btrbk.timer.tmp "$(DESTDIR)$(SYSTEMDDIR)/btrbk.timer"
install -p -m 644 contrib/systemd/delay.timer.tmp "$(DESTDIR)$(TIMERCONF)/btrbk.timer.d/delay.timer"
rm contrib/systemd/btrbk.service.tmp
rm contrib/systemd/btrbk.timer.tmp
rm contrib/systemd/delay.timer.tmp

install-share:
@echo 'installing auxiliary scripts...'
Expand Down
3 changes: 3 additions & 0 deletions contrib/systemd/delay.timer.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[Timer]
OnBootSec=5m
Persistent=no