diff options
author | Nguyễn Gia Phong <cnx@loang.net> | 2025-06-19 09:02:11 +0900 |
---|---|---|
committer | Nguyễn Gia Phong <cnx@loang.net> | 2025-06-19 09:02:11 +0900 |
commit | 8a6154ff22609d7044f16c56cdac8d065332d6bc (patch) | |
tree | 8067bb02207aa502bd11f7c5d0f6d54ff0db3142 | |
parent | dd0ae4f55b191f66a9a159abe8af2baa95ed6635 (diff) | |
download | scadere-8a6154ff22609d7044f16c56cdac8d065332d6bc.tar.gz |
Elaborate on installation and usage
-rw-r--r-- | README.md | 30 | ||||
-rw-r--r-- | REUSE.toml | 1 | ||||
-rw-r--r-- | contrib/scadere-check.service | 7 | ||||
-rw-r--r-- | contrib/scadere-check.timer | 11 | ||||
-rw-r--r-- | contrib/scadere-listen.service | 11 |
5 files changed, 59 insertions, 1 deletions
diff --git a/README.md b/README.md index 9c6fa29..3c0b0fe 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,28 @@ Scadere is a TLS certificate renewal reminder. It checks for certificates that are about to expire and provides an Atom feed for notification. +## Installation + +The recommended installtion method is through your distribution. +Installing from source should only be considered as a last resort; +if you are capable of doing so, please also package scadere +for your distribution. + +Scadere requires Python 3.11 or above, and uses [flit] +as the PEP 517 build backend. Installation can be done +with `flit install` or `pip install .`. + +With `scadere-check` and `scadere-listen` under `$prefix/bin`, +the manual pages can be built and installed using `make(1p)`, +GNU [help2man] and `install(1)`: + + cd doc + make PREFIX=$prefix + make install PREFIX=$prefix + +(FYI, GNU make has an extension that allows specifying `--directory=doc`, +which can save you from having to change the directory.) + ## Usage ### Expiration checking @@ -21,7 +43,8 @@ Options: output file (default to stdout) ``` -It is recommended to run `scadere-check` as a cron job. +It is recommended to schedule `scadere-check` chronically. +See `contrib/scadere-check.*` for an example systemd timer configuration. ### Expiration notification @@ -47,6 +70,9 @@ Options: title of Atom feeds ``` +A sample `scadere-listen.service` for systemd +is also availble under the `contrib` directory. + ## Hacking Unit testing is done with [pytest], [pytest-asyncio], @@ -82,6 +108,8 @@ Scadere is free software: you can redistribute and/or modify it under the terms of the GNU [Affero General Public License][agpl] version 3 or later. +[flit]: https://flit.pypa.io +[help2man]: https://www.gnu.org/software/help2man [pytest]: https://docs.pytest.org [pytest-asyncio]: https://pytest-asyncio.rtfd.io [Hypothesis]: https://hypothesis.rtfd.io diff --git a/REUSE.toml b/REUSE.toml index 9113eab..0e14a80 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -3,6 +3,7 @@ version = 1 [[annotations]] path = [ '.gitignore', 'README.md', + 'contrib/*', 'doc/*.h2m', 'pyproject.toml' ] SPDX-FileCopyrightText = 'None' diff --git a/contrib/scadere-check.service b/contrib/scadere-check.service new file mode 100644 index 0000000..ad57246 --- /dev/null +++ b/contrib/scadere-check.service @@ -0,0 +1,7 @@ +[Unit] +Description=Run scadere-check +After=network.target + +[Service] +ExecStart=scadere-check --output=/var/lib/scadere/certificates \ + example.com example.net diff --git a/contrib/scadere-check.timer b/contrib/scadere-check.timer new file mode 100644 index 0000000..235e4c3 --- /dev/null +++ b/contrib/scadere-check.timer @@ -0,0 +1,11 @@ +[Unit] +Description=Run scadere-check everyday + +[Timer] +OnCalendar=daily +Persistent=true +RandomizedDelaySec=86400 +FixedRandomDelay=true + +[Install] +WantedBy=timers.timer diff --git a/contrib/scadere-listen.service b/contrib/scadere-listen.service new file mode 100644 index 0000000..15c97a8 --- /dev/null +++ b/contrib/scadere-listen.service @@ -0,0 +1,11 @@ +[Unit] +Description=Run scadere-listen +After=network.target + +[Service] +ExecStart=scadere-listen --title='TLS cert renewal' \ + /var/lib/scadere/certificates https://scadere.example :4433 +Restart=on-failure + +[Install] +WantedBy=default.target |