Giter VIP home page Giter VIP logo

heavy_script's Introduction

HeavyScript

Contact

If you have questions or would like to contribute, I have a sub discord category hosted on the Truecharts Discord.

https://discord.gg/tVsPTHWTtr

Website

HeavySetup - Further Explanation

Table of contents:

Click to expand


The Menu

image

Access this with heavyscript



Arguments

App

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.

Backup

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.

DNS

heavyscript dns [Optional Flag]

Flag Example Description
-a
--all
-a
--all
Display all DNS information.

Enable

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.

Git

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.

Pod

heavyscript pod [Flag]

Flag Example Description
-l
--logs
-l
--logs
Display container logs.
-s
--shell
-s
--shell
Open a shell for the container.

PVC

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.

Self-Update

heavyscript self-update

Flag Example Description
--major --major Includes major updates when self-updating

Update

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


How to Install

One Line Install

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



How to Update

While Updating

heavyscript update --self-update [OPTIONS]

Direct

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.



Configuration File

Purpose

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.


Disabling the Configuration

To disable the configuration for a specific run of the script, use:

heavyscript --no-config

This will ignore the configuration file for that run.



Cron Jobs

How to Create a Cron Job

  1. TrueNAS SCALE GUI
  2. System Settings
  3. Advanced
  4. Cron Jobs
    1. Click Add

image

  • 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.


My Personal Cron Job

bash /root/heavy_script/heavy_script.sh update --backup 14 --concurrent 10 --prune --rollback --sync --self-update


heavy_script's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.