If you have questions or would like to contribute, I have a sub discord category hosted on the Truecharts Discord.
HeavySetup - Further Explanation
Click to expand
Access this with
heavyscript
heavyscript app [Flag]
Flag | Example | Parameter | Description |
---|---|---|---|
-s --start |
-s --start |
[Optional: app name] | Start an application. |
-x --stop |
-x --stop |
[Optional: app name] | Stop an application. |
-r --restart |
-r --restart |
[Optional: app name] | Restart an application. |
-d --delete |
-d --delete |
[Optional: app name] | Delete an application. |
heavyscript backup [Flag]
Flag | Example | Parameter | Description |
---|---|---|---|
-c [number] --create [number] |
-c 15 --create 15 |
Integer | Create a backup with the specified retention number. |
-r --restore |
-r --restore |
Restore a backup. | |
-d --delete |
-d --delete |
Delete a backup. |
heavyscript dns [Optional Flag]
Flag | Example | Description |
---|---|---|
-a --all |
-a --all |
Display all DNS information. |
heavyscript enable [Flag]
Flag | Example | Description |
---|---|---|
--api | --api | Enables external access to the Kubernetes API server. |
--apt | --apt | Enable apt, apt-get, and apt-key. |
--helm | --helm | Enable helm commands. |
heavyscript git [Flag]
Flag | Example | Description |
---|---|---|
-b --branch |
-b --branch |
Choose a branch or tag for HeavyScript to use |
-g --global |
-g --global |
Add the script to the global path. |
heavyscript pod [Flag]
Flag | Example | Description |
---|---|---|
-l --logs |
-l --logs |
Display container logs. |
-s --shell |
-s --shell |
Open a shell for the container. |
heavyscript pvc [Optional Flag]
Flag | Example | Description |
---|---|---|
-m --mount |
-m --mount |
Open a menu to mount PVCs. |
-u --unmount |
-u --unmount |
Unmount all mounted PVCs. |
heavyscript self-update
Flag | Example | Description |
---|---|---|
--major | --major | Includes major updates when self-updating |
heavyscript update [Flags]
Flag | Example | Parameter | Description |
---|---|---|---|
-a --include-major |
-a --include-major |
Update the application even if it is a major version update | |
-b --backup |
-b 14 --backup 14 |
Integer | Take a backup, and set the number of backups to keep |
-c --concurrent |
-c 5 --concurrent 5 |
Integer | How many applications to concurrently update (default: 1) |
-i --ignore |
-i nextcloud -i sonarr --ignore nextcloud --ignore sonarr |
String | Ignore updating the specified application |
-I --ignore-img |
-I --ignore-img |
Ignore container image updates | |
-p --prune |
-p --prune |
Prune unused images after the update | |
-r --rollback |
-r --rollback |
Roll back to the previous version if update failure | |
-s --sync |
-s --sync |
Sync the catalog prior to updating applications | |
-x --stop |
-x --stop |
Stop the application prior to updating | |
-t --timeout |
-t 500 --timeout 500 |
Integer | Set the timeout for the update process in seconds (default: 500) |
-U --self-update |
-U --self-update |
Update HeavyScript itself prior to updating | |
-v --verbose |
-v --verbose |
Display verbose output |
curl -s https://raw.githubusercontent.com/Heavybullets8/heavy_script/main/functions/deploy.sh | bash && source "$HOME/.bashrc" 2>/dev/null && source "$HOME/.zshrc" 2>/dev/null
This will:
- Download HeavyScript, then place you on the latest release
- Place HeavyScript in
/root
- Make HeavyScript executable
- Allow you to run HeavyScript from any directory with
heavyscript
This does not include Cron Jobs, see the Cron section for more information.
From here, you can just run HeavyScript with heavyscript -ARGUMENTS
heavyscript update --self-update [OPTIONS]
heavyscript self-update
self-update will update HeavyScript to the latest release, regardless of the branch or tag you're on, and allows you to use any other arguments.
The configuration file is generated the first time the script is run. You can edit it using nano:
nano ~/heavy_script/config.ini
Modifications in the config file will become the script's defaults.
For example, if you set sync to true under the [UPDATE] section, running heavyscript update
will sync the catalog without specifying --sync
or -s
in the CLI.
To disable the configuration for a specific run of the script, use:
heavyscript --no-config
This will ignore the configuration file for that run.
- TrueNAS SCALE GUI
- System Settings
- Advanced
- Cron Jobs
- Click Add
- Command:
bash /root/heavy_script/heavy_script.sh update
The
bash
, as well as the full path to the script is required for cron jobs to work properly. - Run as: root
Running as root is required for the script to work properly.
- Schedule: I run mine daily at 4:00 AM
- Hide Standard Output: Unchecked
- Hide Standard Error: Unchecked
Keep these both unchecked so you can recive an email.
bash /root/heavy_script/heavy_script.sh update --backup 14 --concurrent 10 --prune --rollback --sync --self-update