From 38569051083620400edba1e8e4763cb8ac945168 Mon Sep 17 00:00:00 2001 From: Matt Reeves Date: Mon, 15 Apr 2024 06:18:42 +0000 Subject: [PATCH] Update scripts/README.md --- scripts/README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/scripts/README.md b/scripts/README.md index 9e5967a..b229d6b 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -1,3 +1,6 @@ +Modified version of https://github.com/loganmarchione/dccd, with Gotify notification on error and allowing to choose which directory is cd'd into before running script. I run this on each docker host through crontab every 30 minutes, just adding the -f flag with the folder which that host represents. + + Make executable: ``` sudo chmod +x dccd.sh @@ -6,7 +9,7 @@ Example: ``` ./dccd.sh -b main -d /home/mafyuh/Auto-Homelab -p -f 'arrs' ``` -Crontab: +Crontab every 30 mins: ``` */30 * * * * /home/mafyuh/Auto-Homelab/scripts/dccd.sh -b main -d /home/mafyuh/Auto-Homelab -l /tmp/dccd.txt -p -f 'arrs' ``` @@ -19,3 +22,14 @@ Export Variables: export GOTIFY_BASE_URL="https:go.example.com" export GOTIFY_TOKEN="token" ``` +Full Usage: +``` +Options: + -b Specify the remote branch to track (default: main) + -d Specify the base directory of the git repository (required) + -h Show this help message + -l Specify the path to the log file (default: /tmp/dccd.log) + -p Specify if you want to prune docker images (default: don't prune) + -x Exclude directories matching the specified pattern (relative to the base directory) + -f Specify the pattern for folder names to match +``` \ No newline at end of file