mirror of https://github.com/digint/btrbk
respect BINDIR in systemd and cron files
parent
cb0851c8b6
commit
0d90b7b368
2
Makefile
2
Makefile
|
@ -22,11 +22,13 @@ install-systemd:
|
||||||
@echo 'installing systemd service units...'
|
@echo 'installing systemd service units...'
|
||||||
install -Dm644 contrib/systemd/btrbk.service "$(DESTDIR)$(SYSTEMDDIR)/btrbk.service"
|
install -Dm644 contrib/systemd/btrbk.service "$(DESTDIR)$(SYSTEMDDIR)/btrbk.service"
|
||||||
install -Dm644 contrib/systemd/btrbk.timer "$(DESTDIR)$(SYSTEMDDIR)/btrbk.timer"
|
install -Dm644 contrib/systemd/btrbk.timer "$(DESTDIR)$(SYSTEMDDIR)/btrbk.timer"
|
||||||
|
sed -i -e "s#@BINDIR@#$(BINDIR)#g" "$(DESTDIR)$(SYSTEMDDIR)/btrbk.service"
|
||||||
|
|
||||||
install-share:
|
install-share:
|
||||||
@echo 'installing auxiliary scripts...'
|
@echo 'installing auxiliary scripts...'
|
||||||
install -Dm755 ssh_filter_btrbk.sh "$(DESTDIR)$(SCRIPTDIR)/ssh_filter_btrbk.sh"
|
install -Dm755 ssh_filter_btrbk.sh "$(DESTDIR)$(SCRIPTDIR)/ssh_filter_btrbk.sh"
|
||||||
install -Dm755 contrib/cron/btrbk-mail "$(DESTDIR)$(SCRIPTDIR)/btrbk-mail"
|
install -Dm755 contrib/cron/btrbk-mail "$(DESTDIR)$(SCRIPTDIR)/btrbk-mail"
|
||||||
|
sed -i -e "s#@BINDIR@#$(BINDIR)#g" "$(DESTDIR)$(SCRIPTDIR)/btrbk-mail"
|
||||||
|
|
||||||
install-man:
|
install-man:
|
||||||
@echo 'installing manpages...'
|
@echo 'installing manpages...'
|
||||||
|
|
|
@ -106,7 +106,7 @@ done
|
||||||
# run btrbk
|
# run btrbk
|
||||||
#
|
#
|
||||||
log_info "running btrbk"
|
log_info "running btrbk"
|
||||||
ret=$(/usr/sbin/btrbk -c "$config" ${btrbk_opts:-} run 2>&1)
|
ret=$(@BINDIR@/btrbk -c "$config" ${btrbk_opts:-} run 2>&1)
|
||||||
exitcode=$?
|
exitcode=$?
|
||||||
case $exitcode in
|
case $exitcode in
|
||||||
0) status="All backups successful"
|
0) status="All backups successful"
|
||||||
|
|
|
@ -3,4 +3,4 @@ Description=btrbk backup
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
ExecStart=/usr/sbin/btrbk run
|
ExecStart=@BINDIR@/btrbk run
|
||||||
|
|
Loading…
Reference in New Issue