Skip to content

jhthorp/Server-Scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Server Scripts

The scripts within this project are to support various useful operations with stand-alone servers such as TrueNAS.

Table of Contents

Warnings

⚠️ ⚠️ ⚠️
⚠️ Executing Burn-In/Erase scripts will destroy data! ⚠️
⚠️ ⚠️ ⚠️

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Setup

In order to use the scripts within this package, you will need to clone, or download, into the same top-level directory path, the following repositories:

/path/to/Utility-Scripts
/path/to/Drive-Scripts
/path/to/Bundler-Scripts
/path/to/Server-Scripts

Scripts

General

upload_and_run_command.sh

A script to create a scripts bundle and upload it to a server before executing the command.

Usage

[bash] ./upload_and_run_command.sh [auto_skip] <srcDir> <host> <port> 
[remote_user] [command_to_run]

Options

Option Flag Description
N/A N/A

Parameters

Parameter Description
Automated Skip Continue without prompting
Source Directory Source directory
Host Host address to connect to
Port Port to connect on
Remote User User to connect with
Command To Run Command to execute

Examples

  • ./upload_and_run_command.sh "../TrueNAS-Scripts" 192.168.1.1 22
  • ./upload_and_run_command.sh "../TrueNAS-Scripts" 192.168.1.1 22 "root"
  • ./upload_and_run_command.sh "../TrueNAS-Scripts" 192.168.1.1 22 "root" "pwd"
  • ./upload_and_run_command.sh "auto_skip" "../TrueNAS-Scripts" 192.168.1.1 22 "root" "pwd"

upload_and_run_script.sh

A script to create a scripts bundle and upload it to a server before starting the script.

Usage

[bash] ./upload_and_run_script.sh [auto_skip] <srcDir> <host> <port> 
[remote_user] [script_to_run]

Options

Option Flag Description
N/A N/A

Parameters

Parameter Description
Automated Skip Continue without prompting
Source Directory Source directory
Host Host address to connect to
Port Port to connect on
Remote User User to connect with
Script To Run Script to execute

Examples

  • ./upload_and_run_script.sh "../TrueNAS-Scripts" 192.168.1.1 22
  • ./upload_and_run_script.sh "../TrueNAS-Scripts" 192.168.1.1 22 "root"
  • ./upload_and_run_script.sh "../TrueNAS-Scripts" 192.168.1.1 22 "root" "Utility-Scripts/tmux/start_tmux_session 'session-name'"
  • ./upload_and_run_script.sh "auto_skip" "../TrueNAS-Scripts" 192.168.1.1 22 "root" "Utility-Scripts/tmux/start_tmux_session 'session-name'"

upload_bundle.sh

A script to create a scripts bundle and upload it to a server.

Usage

[bash] ./upload_bundle.sh [auto_skip] <srcDir> <host> <port> [remote_user]

Options

Option Flag Description
N/A N/A

Parameters

Parameter Description
Automated Skip Continue without prompting
Source Directory Source directory
Host Host address to connect to
Port Port to connect on
Remote User User to connect with

Examples

  • ./upload_bundle.sh "../TrueNAS-Scripts" 192.168.1.1 22
  • ./upload_bundle.sh "../TrueNAS-Scripts" 192.168.1.1 22 "root"
  • ./upload_bundle.sh "auto_skip" "../TrueNAS-Scripts" 192.168.1.1 22 "root"

Processes

download_burnin_results.sh

A script to download the output files from a Burn-In process.

Usage

[bash] ./download_burnin_results.sh [auto_skip] <host> <port> <remote_user>

Options

Option Flag Description
N/A N/A

Parameters

Parameter Description
Automated Skip Continue without prompting
Host Host address to connect to
Port Port to connect on
Remote User User to connect with

Examples

  • ./download_burnin_results.sh 192.168.1.1 22 "root"
  • ./download_burnin_results.sh "auto_skip" 192.168.1.1 22 "root"

download_erase_results.sh

A script to download the output files from an Erase process.

Usage

[bash] ./download_erase_results.sh [auto_skip] <host> <port> <remote_user>

Options

Option Flag Description
N/A N/A

Parameters

Parameter Description
Automated Skip Continue without prompting
Host Host address to connect to
Port Port to connect on
Remote User User to connect with

Examples

  • ./download_erase_results.sh 192.168.1.1 22 "root"
  • ./download_erase_results.sh "auto_skip" 192.168.1.1 22 "root"

upload_and_run_burnin.sh

A script to create a Utility scripts bundle and upload it to a server before starting the Burn-In process.

Usage

[bash] ./upload_and_run_burnin.sh [auto_skip] <host> <port> [remote_user] 
[drives_override] [zero_drives] [session_suffix] [end_on_detach]

Options

Option Flag Description
N/A N/A

Parameters

Parameter Description
Automated Skip Continue without prompting
Host Host address to connect to
Port Port to connect on
Remote User User to connect with
drives_override Array of drive IDs to burn-in
zero_drives Zero the drives after testing has completed
session_suffix Suffix to add to the session name
end_on_detach End process when the TMUX session is detached

Examples

  • ./upload_and_run_burnin.sh 192.168.1.1 22
  • ./upload_and_run_burnin.sh 192.168.1.1 22 "root"
  • ./upload_and_run_burnin.sh 192.168.1.1 22 "root" "/dev/da0 /dev/da2 /dev/da4"
  • ./upload_and_run_burnin.sh 192.168.1.1 22 "root" "/dev/da0 /dev/da2 /dev/da4" true
  • ./upload_and_run_burnin.sh 192.168.1.1 22 "root" "/dev/da0 /dev/da2" false "session2"
  • ./upload_and_run_burnin.sh 192.168.1.1 22 "root" "/dev/da0 /dev/da2" false "s3" true
  • ./upload_and_run_burnin.sh "auto_skip" 192.168.1.1 22 "root" "/dev/da0 /dev/da2" false "s3" true

upload_and_run_erase.sh

A script to create a Utility scripts bundle and upload it to a server before starting the Erase process.

Usage

[bash] ./upload_and_run_erase.sh [auto_skip] <host> <port> [remote_user] 
[drives_override] [session_suffix] [end_on_detach]

Options

Option Flag Description
N/A N/A

Parameters

Parameter Description
Automated Skip Continue without prompting
Host Host address to connect to
Port Port to connect on
Remote User User to connect with
drives_override Array of drive IDs to burn-in
session_suffix Suffix to add to the session name
end_on_detach End process when the TMUX session is detached

Examples

  • ./upload_and_run_erase.sh 192.168.1.1 22
  • ./upload_and_run_erase.sh 192.168.1.1 22 "root"
  • ./upload_and_run_erase.sh 192.168.1.1 22 "root" "/dev/da0 /dev/da2 /dev/da4"
  • ./upload_and_run_erase.sh 192.168.1.1 22 "root" "/dev/da0 /dev/da2" "session2"
  • ./upload_and_run_erase.sh 192.168.1.1 22 "root" "/dev/da0 /dev/da2" "s3" true
  • ./upload_and_run_erase.sh "auto_skip" 192.168.1.1 22 "root" "/dev/da0 /dev/da2" "s3" true

TrueNAS

create_truenas_bundle.sh

A script to create an archive bundle for uploading to a TrueNAS server.

Usage

[bash] ./create_truenas_bundle.sh [auto_skip] [completeBundleName]

Options

Option Flag Description
N/A N/A

Parameters

Parameter Description
Automated Skip Continue without prompting
Bundle Name Name for the output bundle

Examples

  • ./create_truenas_bundle.sh "TrueNAS"
  • ./create_truenas_bundle.sh "auto_skip" "TrueNAS"

upload_truenas_bundle.sh

A script to create a TrueNAS scripts bundle and upload it to a server.

Usage

[bash] ./upload_truenas_bundle.sh [auto_skip] <host> <port> [remote_user]

Options

Option Flag Description
N/A N/A

Parameters

Parameter Description
Automated Skip Continue without prompting
Host Host address to connect to
Port Port to connect on
Remote User User to connect with

Examples

  • ./upload_truenas_bundle.sh 192.168.1.1 22
  • ./upload_truenas_bundle.sh 192.168.1.1 22 "root"
  • ./upload_truenas_bundle.sh "auto_skip" 192.168.1.1 22 "root"

Deployment

This section provides additional notes about how to deploy this on a live system.

Dependencies

Notes

This project does not contain any additional notes at this time.

Test Environments

Operating System Compatibility

Status System
MacOS 11.2.x
MacOS 11.1.x
MacOS 11.0.x

Hardware Compatibility

Status Component
MacBook Pro (15-inch, 2018)

Contributing

Please read CODE_OF_CONDUCT for details on our Code of Conduct and CONTRIBUTING for details on the process for submitting pull requests.

Support

Please read SUPPORT for details on how to request support from the team. For any security concerns, please read SECURITY for our related process.

Versioning

We use Semantic Versioning for versioning. For available releases, please see the available tags or look through our Release Notes. For extensive documentation of changes between releases, please see the Changelog.

Authors

  • Jack Thorp - Initial work - jhthorp

See also the list of contributors who participated in this project.

Copyright

Copyright © 2020 - 2021, Jack Thorp and associated contributors.

License

This project is licensed under the GNU General Public License - see the LICENSE for details.

Acknowledgments

  • N/A

About

A collection of server scripts.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages