Skip to content

Commit

Permalink
enh: adjustments and corrections per new directory structure and code…
Browse files Browse the repository at this point in the history
… refactor

changelog: enhancements
  • Loading branch information
JMSDOnline committed May 1, 2023
1 parent 859fad9 commit a3577b7
Show file tree
Hide file tree
Showing 20 changed files with 237 additions and 230 deletions.
18 changes: 9 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Contributing

> VStacklet is an open source project licensed using the The MIT License.
> vStacklet is an open source project licensed using the The MIT License.
> This project has been forked and completely rewritten from [Quick LEMP](https://github.com/jbradach/quick-lemp/).
> Though the two are not the same and are entirely different, vStacklet has drawn inspiration from Quick LEMP and is grateful for the work that has been done.
> I appreciate pull requesets as well as other types of contributions.
> I appreciate pull requesets as well as other types of contributions. Any contributions, suggestions, or comments are welcome!
## Documentation

Documentation is available at: [/docs/](https://github.com/JMSDOnline/vstacklet/tree/development/docs)
- :book: [vStacklet Documentation](https://github.com/JMSDOnline/vstacklet/blob/development/docs/setup/vstacklet.sh.md)
- :book: [vStacklet Server Stack Documentation](https://github.com/JMSDOnline/vstacklet/blob/development/docs/setup/vstacklet-server-stack.sh.md)
- :book: [vStacklet www-permissions.sh) Documentation](https://github.com/JMSDOnline/vstacklet/blob/development/docs/bin/www-permissions.sh.md)
- :book: [vStacklet VS-Perms (www-permissions-standalone.sh) Documentation](https://github.com/JMSDOnline/vstacklet/blob/development/docs/bin/www-permissions-standalone.sh.md)
- :book: [vStacklet VS-Backup (vs-backup) Documentation](https://github.com/JMSDOnline/vstacklet/blob/development/docs/bin/backup/vs-backup.md)
- :book: [vStacklet VS-Backup (vstacklet-backup-standalone.sh) Documentation](https://github.com/JMSDOnline/vstacklet/blob/development/docs/bin/backup/vstacklet-backup-standalone.sh.md)
Documentation is available at: [/docs/](https://github.com/JMSDOnline/vstacklet/tree/main/docs)
- :book: [vStacklet Documentation](https://github.com/JMSDOnline/vstacklet/blob/main/docs/setup/vstacklet.sh.md)
- :book: [vStacklet Server Stack Documentation](https://github.com/JMSDOnline/vstacklet/blob/main/docs/setup/vstacklet-server-stack.sh.md)
- :book: [vStacklet www-permissions.sh) Documentation](https://github.com/JMSDOnline/vstacklet/blob/main/docs/bin/www-permissions.sh.md)
- :book: [vStacklet VS-Perms (www-permissions-standalone.sh) Documentation](https://github.com/JMSDOnline/vstacklet/blob/main/docs/bin/www-permissions-standalone.sh.md)
- :book: [vStacklet VS-Backup (vs-backup) Documentation](https://github.com/JMSDOnline/vstacklet/blob/main/docs/bin/backup/vs-backup.md)
- :book: [vStacklet VS-Backup (vstacklet-backup-standalone.sh) Documentation](https://github.com/JMSDOnline/vstacklet/blob/main/docs/bin/backup/vstacklet-backup-standalone.sh.md)

## How to Contribute

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

## Script status

Version: v3.1.1.745
Build: 745
Version: v3.1.1.746
Build: 746

[![MIT License](https://img.shields.io/badge/license-MIT%20License-blue.svg?style=flat-square)](https://github.com/JMSDOnline/vstacklet/blob/main/LICENSE)

Expand Down
12 changes: 6 additions & 6 deletions bin/backup/backup-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
################################################################################
# <START METADATA>
# @file_name: backup-cleanup.sh
# @version: 3.1.1105
# @version: 3.1.1106
# @description: This script will add a new www-data group on your server
# and set permissions for ${www_root:-/var/www/html}.
# Please ensure you have read the documentation before continuing.
Expand Down Expand Up @@ -53,7 +53,7 @@
################################################################################
# @name: vstacklet::backup::args() (3)
# process options
# @description: Process the options passed to the script. [see function](https://github.com/JMSDOnline/vstacklet/blob/development/bin/backup/backup-cleanup.sh#L66-L117)
# @description: Process the options passed to the script. [see function](https://github.com/JMSDOnline/vstacklet/blob/main/bin/backup/backup-cleanup.sh#L66-L117)
#
# notes:
# - This script function is responsible for processing the options passed to the
Expand Down Expand Up @@ -118,7 +118,7 @@ vstacklet::backup::args() {

##################################################################################
# @name: vstacklet::environment::functions (2)
# @description: Stage various functions for the setup environment. [see function](https://github.com/JMSDOnline/vstacklet/blob/development/bin/backup/backup-cleanup.sh#L125-L204)
# @description: Stage various functions for the setup environment. [see function](https://github.com/JMSDOnline/vstacklet/blob/main/bin/backup/backup-cleanup.sh#L125-L204)
# @script-note: This function is required for the installation of the vStacklet software.
# @break
##################################################################################
Expand Down Expand Up @@ -205,7 +205,7 @@ vstacklet::environment::functions() {

##################################################################################
# @name: vstacklet::environment::checkroot (1)
# @description: Check if the user is root. [see function](https://github.com/JMSDOnline/vstacklet/blob/development/bin/backup/backup-cleanup.sh#L211-L216)
# @description: Check if the user is root. [see function](https://github.com/JMSDOnline/vstacklet/blob/main/bin/backup/backup-cleanup.sh#L211-L216)
# @break
##################################################################################
vstacklet::environment::checkroot() {
Expand All @@ -217,7 +217,7 @@ vstacklet::environment::checkroot() {

##################################################################################
# @name: vstacklet::backup::clean (4)
# @description: Main function for cleaning up backups. [see function](https://github.com/JMSDOnline/vstacklet/blob/development/bin/backup/backup-cleanup.sh#L223-L244)
# @description: Main function for cleaning up backups. [see function](https://github.com/JMSDOnline/vstacklet/blob/main/bin/backup/backup-cleanup.sh#L223-L244)
# @break
##################################################################################
vstacklet::backup::clean() {
Expand Down Expand Up @@ -245,7 +245,7 @@ vstacklet::backup::clean() {

##################################################################################
# @name: vstacklet::backup::usage
# @description: Display usage information for the script. [see function](https://github.com/JMSDOnline/vstacklet/blob/development/bin/backup/backup-cleanup.sh#L251-L280)
# @description: Display usage information for the script. [see function](https://github.com/JMSDOnline/vstacklet/blob/main/bin/backup/backup-cleanup.sh#L251-L280)
# @break
##################################################################################
vstacklet::backup::usage() {
Expand Down
34 changes: 17 additions & 17 deletions bin/backup/vs-backup
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
################################################################################
# <START METADATA>
# @file_name: vs-backup
# @version: 3.1.1147
# @version: 3.1.1148
# @description: This script will allow you to backup your vStacklet server
# files and databases.
#
Expand All @@ -15,8 +15,8 @@
# This script will backup your database and files.
# Please ensure you have read the documentation before continuing.
#
# - [vStacklet Documentation](https://github.com/JMSDOnline/vstacklet/blob/development/docs/setup/vstacklet.sh.md)
# - [vStacklet Server Stack Documentation](https://github.com/JMSDOnline/vstacklet/blob/development/docs/setup/vstacklet-server-stack.sh.md)
# - [vStacklet Documentation](https://github.com/JMSDOnline/vstacklet/blob/main/docs/setup/vstacklet.sh.md)
# - [vStacklet Server Stack Documentation](https://github.com/JMSDOnline/vstacklet/blob/main/docs/setup/vstacklet-server-stack.sh.md)
#
# This script will do the following:
# - Backup your database.
Expand Down Expand Up @@ -64,7 +64,7 @@
# <END METADATA>
################################################################################
# @name: vstacklet::environment::functions (2)
# @description: Stage various functions for the setup environment. [see function](https://github.com/JMSDOnline/vstacklet/blob/development/bin/backup/vs-backup#L70-L149)
# @description: Stage various functions for the setup environment. [see function](https://github.com/JMSDOnline/vstacklet/blob/main/bin/backup/vs-backup#L70-L149)
# @break
##################################################################################
vstacklet::environment::functions() {
Expand Down Expand Up @@ -150,7 +150,7 @@ vstacklet::environment::functions() {

##################################################################################
# @name: vstacklet::environment::checkroot (1)
# @description: Check if the user is root. [see function](https://github.com/JMSDOnline/vstacklet/blob/development/bin/backup/vs-backup#L156-L161)
# @description: Check if the user is root. [see function](https://github.com/JMSDOnline/vstacklet/blob/main/bin/backup/vs-backup#L156-L161)
# @break
##################################################################################
vstacklet::environment::checkroot() {
Expand All @@ -162,7 +162,7 @@ vstacklet::environment::checkroot() {

##################################################################################
# @name: vstacklet::backup::variables (3)
# @description: Set the variables for the backup. [see function](https://github.com/JMSDOnline/vstacklet/blob/development/bin/backup/vs-backup#L168-L297)
# @description: Set the variables for the backup. [see function](https://github.com/JMSDOnline/vstacklet/blob/main/bin/backup/vs-backup#L168-L297)
# @break
##################################################################################
vstacklet::backup::variables() {
Expand Down Expand Up @@ -298,7 +298,7 @@ vstacklet::backup::variables() {

##################################################################################
# @name: vstacklet::backup::default::variables (4)
# @description: The variables used in the backup script. [see function](https://github.com/JMSDOnline/vstacklet/blob/development/bin/backup/vs-backup#L304-L351)
# @description: The variables used in the backup script. [see function](https://github.com/JMSDOnline/vstacklet/blob/main/bin/backup/vs-backup#L304-L351)
# @break
##################################################################################
vstacklet::backup::default::variables() {
Expand Down Expand Up @@ -352,7 +352,7 @@ vstacklet::backup::default::variables() {

##################################################################################
# @name: vstacklet::backup::main::checks (5)
# @description: The checks used in the backup script. [see function](https://github.com/JMSDOnline/vstacklet/blob/development/bin/backup/vs-backup#L358-L391)
# @description: The checks used in the backup script. [see function](https://github.com/JMSDOnline/vstacklet/blob/main/bin/backup/vs-backup#L358-L391)
# @break
##################################################################################
vstacklet::backup::main::checks() {
Expand Down Expand Up @@ -392,7 +392,7 @@ vstacklet::backup::main::checks() {

##################################################################################
# @name: vstacklet::intro (6)
# @description: Prints the intro message. [see function](https://github.com/JMSDOnline/vstacklet/blob/development/bin/backup/vs-backup#L398-L415)
# @description: Prints the intro message. [see function](https://github.com/JMSDOnline/vstacklet/blob/main/bin/backup/vs-backup#L398-L415)
# @break
##################################################################################
vstacklet::intro() {
Expand All @@ -402,7 +402,7 @@ vstacklet::intro() {
vstacklet::shell::text::white "Please ensure you have read the documentation before continuing."
vstacklet::shell::misc::nl
vstacklet::shell::text::white "Documentation can be found at:"
vstacklet::shell::text::white "https://github.com/JMSDOnline/vstacklet/blob/development/docs/bin/backup/vs-backup.md"
vstacklet::shell::text::white "https://github.com/JMSDOnline/vstacklet/blob/main/docs/bin/backup/vs-backup.md"
vstacklet::shell::misc::nl
vstacklet::ask::continue
}
Expand All @@ -416,7 +416,7 @@ vstacklet::ask::continue() {

##################################################################################
# @name: vstacklet::backup::files (7)
# @description: Backup the specified files. [see function](https://github.com/JMSDOnline/vstacklet/blob/development/bin/backup/vs-backup#L422-L465)
# @description: Backup the specified files. [see function](https://github.com/JMSDOnline/vstacklet/blob/main/bin/backup/vs-backup#L422-L465)
# @break
##################################################################################
vstacklet::backup::files() {
Expand Down Expand Up @@ -466,7 +466,7 @@ vstacklet::backup::files() {

################################################################################
# @name: vstacklet::backup::database (8)
# @description: Backup a database. [see function](https://github.com/JMSDOnline/vstacklet/blob/development/bin/backup/vs-backup#L485-L524)
# @description: Backup a database. [see function](https://github.com/JMSDOnline/vstacklet/blob/main/bin/backup/vs-backup#L485-L524)
#
# note: This function will additionally package the database backup into a tarball
# and compress it on the fly, then encrypt it. The tarball will be moved to the
Expand Down Expand Up @@ -526,7 +526,7 @@ vstacklet::backup::database() {
##################################################################################
# @name: vstacklet::backup::retention (9)
# @description: The retention used in the backup script. This is used to delete
# old backups. [see function](https://github.com/JMSDOnline/vstacklet/blob/development/bin/backup/vs-backup#L544-L568)
# old backups. [see function](https://github.com/JMSDOnline/vstacklet/blob/main/bin/backup/vs-backup#L544-L568)
#
# notes:
# - The retention is based on the modification time of the file.
Expand Down Expand Up @@ -569,7 +569,7 @@ vstacklet::backup::retention() {

##################################################################################
# @name: vstacklet::outro (10)
# @description: Prints the outro message. [see function](https://github.com/JMSDOnline/vstacklet/blob/development/bin/backup/vs-backup#L575-L580)
# @description: Prints the outro message. [see function](https://github.com/JMSDOnline/vstacklet/blob/main/bin/backup/vs-backup#L575-L580)
# @break
##################################################################################
vstacklet::outro() {
Expand All @@ -581,7 +581,7 @@ vstacklet::outro() {

##################################################################################
# @name: vstacklet::backup::usage
# @description: Display the usage of the backup script. [see function](https://github.com/JMSDOnline/vstacklet/blob/development/bin/backup/vs-backup#L587-L640)
# @description: Display the usage of the backup script. [see function](https://github.com/JMSDOnline/vstacklet/blob/main/bin/backup/vs-backup#L587-L640)
# @break
##################################################################################
vstacklet::backup::usage() {
Expand Down Expand Up @@ -641,7 +641,7 @@ vstacklet::backup::usage() {

##################################################################################
# @name: vstacklet::backup::example_cron
# @description: Example cron job for the backup script. [see function](https://github.com/JMSDOnline/vstacklet/blob/development/bin/backup/vs-backup#L647-L655)
# @description: Example cron job for the backup script. [see function](https://github.com/JMSDOnline/vstacklet/blob/main/bin/backup/vs-backup#L647-L655)
# @break
##################################################################################
vstacklet::backup::example_cron() {
Expand All @@ -656,7 +656,7 @@ vstacklet::backup::example_cron() {

##################################################################################
# @name: vstacklet::backup::version
# @description: Display the version of the backup script. [see function](https://github.com/JMSDOnline/vstacklet/blob/development/bin/backup/vs-backup#L662-L668)
# @description: Display the version of the backup script. [see function](https://github.com/JMSDOnline/vstacklet/blob/main/bin/backup/vs-backup#L662-L668)
# @break
##################################################################################
vstacklet::backup::version() {
Expand Down
16 changes: 8 additions & 8 deletions bin/backup/vstacklet-backup-standalone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
################################################################################
# <START METADATA>
# @file_name: vstacklet-backup-standalone.sh
# @version: 3.1.1142
# @version: 3.1.1143
# @description: This script will grab the latest version of vs-backup and
# install it on your server.
#
Expand All @@ -13,9 +13,9 @@
# This script will backup your database and files.
# Please ensure you have read the documentation before continuing.
#
# - [vStacklet Documentation](https://github.com/JMSDOnline/vstacklet/blob/development/docs/setup/vstacklet.sh.md)
# - [vStacklet Server Stack Documentation](https://github.com/JMSDOnline/vstacklet/blob/development/docs/setup/vstacklet-server-stack.sh.md)
# - [vStacklet VS-Backup Documentation](https://github.com/JMSDOnline/vstacklet/blob/development/docs/bin/backup/vs-backup.md)
# - [vStacklet Documentation](https://github.com/JMSDOnline/vstacklet/blob/main/docs/setup/vstacklet.sh.md)
# - [vStacklet Server Stack Documentation](https://github.com/JMSDOnline/vstacklet/blob/main/docs/setup/vstacklet-server-stack.sh.md)
# - [vStacklet VS-Backup Documentation](https://github.com/JMSDOnline/vstacklet/blob/main/docs/bin/backup/vs-backup.md)
#
# This script will do the following:
# - Download the latest version of vs-backup.
Expand Down Expand Up @@ -53,20 +53,20 @@
# @description: This function will download the latest version of vs-backup
# and install it on your server. It will also convert vs-backup shell scripts
# to executable. From there, you can run vs-backup from anywhere on your server.
# [see function](https://github.com/JMSDOnline/vstacklet/blob/development/bin/backup/vstacklet-backup-standalone.sh#L60-L65)
# [see function](https://github.com/JMSDOnline/vstacklet/blob/main/bin/backup/vstacklet-backup-standalone.sh#L60-L65)
#
# @break
################################################################################
vstacklet::vsbackup::standalone() {
# @script-note: download the latest version of vs-backup
curl -s "https://raw.githubusercontent.com/JMSDOnline/vstacklet/development/bin/backup/vs-backup" >/usr/local/bin/vs-backup
curl -s "https://raw.githubusercontent.com/JMSDOnline/vstacklet/main/bin/backup/vs-backup" >/usr/local/bin/vs-backup
# @script-note: convert vs-backup shell scripts to executable
chmod +x /usr/local/bin/vs-backup
}

################################################################################
# @name: vstacklet::vsbackup::outro
# @description: This function will display the outro. [see function](https://github.com/JMSDOnline/vstacklet/blob/development/bin/backup/vstacklet-backup-standalone.sh#L73-L85)
# @description: This function will display the outro. [see function](https://github.com/JMSDOnline/vstacklet/blob/main/bin/backup/vstacklet-backup-standalone.sh#L73-L85)
#
# @break
################################################################################
Expand All @@ -77,7 +77,7 @@ vstacklet::vsbackup::outro() {
echo "Please see the documentation for more information."
echo ""
echo "Documentation can be found here:"
echo "https://github.com/JMSDOnline/vstacklet/blob/development/docs/bin/backup/vs-backup.md"
echo "https://github.com/JMSDOnline/vstacklet/blob/main/docs/bin/backup/vs-backup.md"
echo ""
echo "You can also run the following command for more information:"
echo "vs-backup -h"
Expand Down
Loading

0 comments on commit a3577b7

Please sign in to comment.