/ShellSculptor

ShellSculptor is a curated collection of Bash scripts focused on deployment and backup tasks for Linux systems. Designed for system administrators and developers, these scripts streamline workflows, enhance productivity, and ensure efficient system management. Perfect for automating repetitive tasks and maintaining system integrity.

Primary LanguageShellMIT LicenseMIT

ShellSculptor

Welcome to ShellSculptor, a curated collection of Bash scripts designed to streamline various Linux tasks, primarily focusing on deployment and backup. These scripts are crafted to help system administrators and developers enhance their productivity and simplify their workflows.

Table of Contents

Scripts Overview

backup_mssql.sh

Description:
This script creates a backup of a specified MSSQL database and saves it to a specified directory.

Usage:

./backup_mssql.sh <database_name> <user:group>

Example:

./backup_mssql.sh RandomDB ftpuser:ftpuser

compress_and_backup.sh

Description:
This script compresses the backups into a ZIP file and moves it to the specified destination directory. It is intended to be run weekly.

Usage:

./compress_and_backup.sh <backup_directory> <destination_directory>

Example:

./compress_and_backup.sh /var/opt/mssql/backups /home/inetpub/APPs/

deploy_service.sh

Description:
This script deploys a service by unzipping a specified ZIP file into a destination directory and setting up a systemd service to manage the application.

Usage:

./deploy_service.sh <destination_directory> <zip_file> <service_name> <executable_path> [service_description]

Example:

./deploy_service.sh /opt/myapp myapp.zip myappservice /opt/myapp/myapp.dll "My Application Service"

unzip_and_set_permissions.sh

Description:
Unzips a specified ZIP file into a destination directory and sets appropriate permissions for executable and configuration files.

Usage:

./unzip_and_set_permissions.sh <destination_directory> <zip_file>

Example:

./unzip_and_set_permissions.sh /opt/myapp myapp.zip

create_systemd_service.sh

Description:
Prompts the user for details and creates a systemd service file to manage a .NET application.

Usage:

./create_systemd_service.sh

Example:
Just run the script and follow the prompts.

compress_directory.sh

Description:
Compresses a specified directory into a ZIP file and moves it to a destination directory, setting the appropriate user and group ownership.

Usage:

./compress_directory.sh <directory_to_compress> <destination_directory> <user:group>

Example:

./compress_directory.sh /var/www/html /backups ftpuser:ftpuser

Usage

Prerequisites

  • Ensure you have the necessary permissions to execute these scripts.
  • Install required dependencies, such as unzip and zip.

Install Unzip:

sudo apt-get update
sudo apt-get install -y unzip

Execution

  1. Clone the Repository:

    git clone https://github.com/IOxee/ShellSculptor.git
    cd ShellSculptor
  2. Make Scripts Executable:

    chmod +x *.sh
  3. Run the Desired Script: Follow the usage instructions provided above for each script.

Example: To backup an MSSQL database:

./backup_mssql.sh RandomDB ftpuser:ftpuser

License

This project is licensed under the MIT License. See the LICENSE file for details.