-
Notifications
You must be signed in to change notification settings - Fork 102
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
Fix README systemd email notification #127
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. The fixes makes sense.
Though the unexpanded $INSTALL_PREFIX sounds like a bug that should be addressed in the Makefile.
I don’t have the possibility to investigate further myself right now but feel free to look into it. I would believe the variable is expanded in other file’s when installing with make.
Put this files in `/etc/systemd/system/`: | ||
* `[email protected]`: A service that can notify you via email when a systemd service fails. Edit the target email address in this file. | ||
Put this file in `/etc/systemd/system/`: | ||
* `[email protected]`: A service that can notify you via email when a systemd service fails. Edit the target email address in this file and remove `$INSTALL_PREFIX` from `ExecStart` line if needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sounds like a bug with the Makefike, so it would be better to try fixing this then adding a manual workaround in the README.
If i run installation on a fresh VM (Debian 12) i get the following after cp bin/restic_backup.sh build/bin/restic_backup.sh
sed -i.bak -e 's|$INSTALL_PREFIX||g' build/bin/restic_backup.sh; rm build/bin/restic_backup.sh.bak
install -m 0555 build/bin/restic_backup.sh /bin/restic_backup.sh
cp bin/restic_check.sh build/bin/restic_check.sh
sed -i.bak -e 's|$INSTALL_PREFIX||g' build/bin/restic_check.sh; rm build/bin/restic_check.sh.bak
install -m 0555 build/bin/restic_check.sh /bin/restic_check.sh
cp bin/resticw build/bin/resticw
sed -i.bak -e 's|$INSTALL_PREFIX||g' build/bin/resticw; rm build/bin/resticw.bak
install -m 0555 build/bin/resticw /bin/resticw
cp etc/restic/backup_exclude.txt build/etc/restic/backup_exclude.txt
sed -i.bak -e 's|$INSTALL_PREFIX||g' build/etc/restic/backup_exclude.txt; rm build/etc/restic/backup_exclude.txt.bak
install -m 0600 -b --suffix=.2023-12-11_21:17:51.bak build/etc/restic/backup_exclude.txt /etc/restic/backup_exclude.txt
cp etc/restic/default.env.sh build/etc/restic/default.env.sh
sed -i.bak -e 's|$INSTALL_PREFIX||g' build/etc/restic/default.env.sh; rm build/etc/restic/default.env.sh.bak
install -m 0600 -b --suffix=.2023-12-11_21:17:51.bak build/etc/restic/default.env.sh /etc/restic/default.env.sh
cp etc/restic/_global.env.sh build/etc/restic/_global.env.sh
sed -i.bak -e 's|$INSTALL_PREFIX||g' build/etc/restic/_global.env.sh; rm build/etc/restic/_global.env.sh.bak
install -m 0600 -b --suffix=.2023-12-11_21:17:51.bak build/etc/restic/_global.env.sh /etc/restic/_global.env.sh
cp etc/restic/pw.txt build/etc/restic/pw.txt
sed -i.bak -e 's|$INSTALL_PREFIX||g' build/etc/restic/pw.txt; rm build/etc/restic/pw.txt.bak
install -m 0600 -b --suffix=.2023-12-11_21:17:51.bak build/etc/restic/pw.txt /etc/restic/pw.txt
cp usr/lib/systemd/system/[email protected] build/usr/lib/systemd/system/[email protected]
sed -i.bak -e 's|$INSTALL_PREFIX||g' build/usr/lib/systemd/system/[email protected]; rm build/usr/lib/systemd/system/[email protected]
install -m 0644 build/usr/lib/systemd/system/[email protected] /usr/lib/systemd/system/[email protected]
cp usr/lib/systemd/system/[email protected] build/usr/lib/systemd/system/[email protected]
sed -i.bak -e 's|$INSTALL_PREFIX||g' build/usr/lib/systemd/system/[email protected]; rm build/usr/lib/systemd/system/[email protected]
install -m 0644 build/usr/lib/systemd/system/[email protected] /usr/lib/systemd/system/[email protected]
cp usr/lib/systemd/system/[email protected] build/usr/lib/systemd/system/[email protected]
sed -i.bak -e 's|$INSTALL_PREFIX||g' build/usr/lib/systemd/system/[email protected]; rm build/usr/lib/systemd/system/[email protected]
install -m 0644 build/usr/lib/systemd/system/[email protected] /usr/lib/systemd/system/[email protected]
cp usr/lib/systemd/system/[email protected] build/usr/lib/systemd/system/[email protected]
sed -i.bak -e 's|$INSTALL_PREFIX||g' build/usr/lib/systemd/system/[email protected]; rm build/usr/lib/systemd/system/[email protected]
install -m 0644 build/usr/lib/systemd/system/[email protected] /usr/lib/systemd/system/[email protected] No trace of This makes sense to me, because email notification is optional as you stated in the original README, so file To further investigate i checked all the files in the previous output, i found that I would change the Detailed Manual Setup |
Hi there! I just observed the same thing while adding #128 I got a little confused to with the I'm wondering if would be more convenient to use a templating notation like |
Ah god find @gerardbosch @giuaig could you please update the OR with the syntax fix? |
@erikw OR = Original Readme? If so i think it's everything already in this PR |
Hi! I packed everything together and posted #131, but I'm afraid that will be conflicts with this PR, so I added the @giuaig changes on that PR in case it gets accepted. #131 would fix what we @giuaig said here:
I hope it can help |
Thanks @gerardbosch. I would be happy to go with #131 that includes this PR. Please amend one of the commits in #131 to attribute @giuaig with https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/creating-a-commit-with-multiple-authors
|
Hello, thanks for your works that allow me to do scheduled backups with restic.
This are just minor fixes in the README, about systemd email notification.
I was getting this error, because
$INSTALL_PREFIX
was still there even if I installed it viamake
:Removing fixed it.
HTH