From d0cd4cb38eec58b4595ce94edde77a792f4cab0c Mon Sep 17 00:00:00 2001 From: Jon Hadfield Date: Tue, 8 Oct 2024 12:17:51 +0100 Subject: [PATCH] update README for release 1.2.20. --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e2a355a..a6fad96 100644 --- a/README.md +++ b/README.md @@ -176,10 +176,11 @@ export GIT_REQUEST_TIMEOUT=600 ## notifications ### Telegram -*(since release 1.2.20)* +*(since release 1.2.20)* To send a Telegram message on completion, set the environment variables: `SOBA_TELEGRAM_BOT_TOKEN` with the bot token `SOBA_TELEGRAM_CHAT_ID` with the chat/group id + To get the bot token: - send a message to @BotFather of /newbot - submit a name, e.g. soba-notifier @@ -192,8 +193,8 @@ To get the chat id: - record the chat id in the response ### Slack -*(since release 1.2.16)* -To send a Slack message on completion, set the environment variables: +*(since release 1.2.16)* +To send a Slack message on completion, set the environment variables: `SLACK_CHANNEL_ID` with the channel id `SLACK_API_TOKEN` with the token for the Slack app For example: @@ -250,7 +251,7 @@ run soba and direct output: ### rotation -[Logrotate](https://linux.die.net/man/8/logrotate) is a utility that comes with most Linux distributions and removes and/or compresses messages older than a certain number of hours or days. +[Logrotate](https://linux.die.net/man/8/logrotate) is a utility that comes with most Linux distributions and removes and/or compresses messages older than a certain number of hours or days. This example assumes you persist the log file to /var/log/soba/soba.log create a file in /etc/logrotate.d/soba with the following content: @@ -285,7 +286,7 @@ ensure the user running soba has an entry in `/etc/cron.allow`. run `crontab -e` -add the following (assuming you have a user called soba with a script to run it called backup in their home directory): +add the following (assuming you have a user called soba with a script to run it called backup in their home directory): `* * * * * /usr/bin/flock -n /tmp/soba.lockfile /home/soba/backup >> /var/log/soba/soba.log 2>&1` note: A useful tool for testing cron jobs is [crontab guru](https://crontab.guru/).