diff --git a/README.md b/README.md index af609280..eae9ad0b 100644 --- a/README.md +++ b/README.md @@ -35,13 +35,16 @@ | -s | -s | None | Sync Catalogs prior to updating | | -p | -p | None | Prune old/unused docker images | +

### Examples #### Typical Cron Job ``` + bash heavy_script.sh --self-update -b 14 -i portainer -i arch -i sonarr -i radarr -t 600 -rsp -u 5 + ``` > `-b` is set to 14. Up to 14 snapshots of your ix-applications dataset will be saved @@ -61,6 +64,8 @@ bash heavy_script.sh --self-update -b 14 -i portainer -i arch -i sonarr -i radar > `--self-update` Will update the script prior to running anything else. +> `--self-update` Will update the script prior to running anything else. + #### Mounting PVC Data ``` @@ -87,7 +92,9 @@ bash /mnt/tank/scripts/heavy_script/heavy_script.sh --dns #### My personal Cron Job ``` + bash /mnt/speed/scripts/heavy_script/heavy_script.sh --self-update -b 14 -rsp -u 10 + ```
diff --git a/heavy_script.sh b/heavy_script.sh index adb5022c..6de0e9de 100644 --- a/heavy_script.sh +++ b/heavy_script.sh @@ -1,5 +1,6 @@ #!/bin/bash + # cd to script, this ensures the script can find the source scripts below, even when ran from a seperate directory script=$(readlink -f "$0") script_path=$(dirname "$script") @@ -23,10 +24,13 @@ source functions/self_update.sh source functions/update_apps.sh + + #If no argument is passed, kill the script. [[ -z "$*" || "-" == "$*" || "--" == "$*" ]] && menu + # Parse script options while getopts ":sirb:t:uUpSRv-:" opt do @@ -153,3 +157,4 @@ fi [[ "$sync" == "true" && -z "$backup" ]] && echo "Syncing catalogs, this takes a LONG time, please wait.." && sync [[ "$update_all_apps" == "true" || "$update_apps" == "true" ]] && commander [[ "$prune" == "true" ]] && prune +