diff --git a/README.md b/README.md index 0570038..a0d4416 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,13 @@ # certrenew.service A sample to configure certbot auto renew with systemd -## Reference +## Download +```sh +# assuming you have `wget` installed +wget -qO- l.sup39.dev/certrenew | sh - +``` + +## References - [crontabを捨てsystemdに定期実行を任せよう。(narikei)](https://qiita.com/narikei/items/ca4823c7f6790f0cbe0b) - [systemd .timerについて調べた事を記事にしておく(SOUICHIROU)](https://www.souichi.club/raspberrypi/systemd-timer/#OnCalendar) - [How do I reload a group of systemd services?](https://unix.stackexchange.com/questions/334471/how-do-i-reload-a-group-of-systemd-services) diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..08f3ebf --- /dev/null +++ b/setup.sh @@ -0,0 +1,14 @@ +#!/bin/sh +baseURL=https://raw.githubusercontent.com/sup39/certrenew.service/master +dst=/etc/systemd/system +if [ ! -w "$dst" ]; then + echo "$dst is not writable. Download to /tmp instead" + dst=/tmp +fi +wget -P "$dst" "$baseURL/certrenew.service" "$baseURL/certrenew.timer" "$baseURL/certrenew.target" "$baseURL/certrenew.path" +cat <