From 193cb7a2a79711c76e1f378e5f02ac64a01b09cd Mon Sep 17 00:00:00 2001 From: samuel-p Date: Thu, 31 Dec 2020 14:00:23 +0100 Subject: [PATCH] improved docs --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index bdf1c54..885b154 100644 --- a/README.md +++ b/README.md @@ -21,3 +21,23 @@ To set up all scripts in the current directory run this: ``` curl https://git.sp-codes.de/samuel-p/awesome-scripts/raw/branch/master/setup.sh | bash -s healthcheck.sh login-notify.sh validate-remote-backup.sh docker-compose-up-all.sh docker-stack-deploy-all.sh node_dir_size_exporter.sh update-notify.sh ``` + +## Usage + +### healthcheck.sh + +Just use it like this in a cronjob: + +``` +0 0 * * * /root/healthcheck.sh 333a77a4-a63e-4885-a045-d52a4f6a3d2f /root/backup.sh > /root/log/last-backup.log 2>&1 +``` + +The first parameter is the healthcheck uuid instead of the script file you can als pass the command to execute directly after the uuid. The pipe to put all output to a log file is also optional. + +### login-notify.sh + +Place a `.gotify` file in the same direction as the script and put the application token in. Append the following line to `/etc/pam.d/sshd`: + +``` +session optional pam_exec.so seteuid /path/to/login-notify.sh +```