Skip to content
/ Shell Public

Scripting - Personal Shell projects

License

Notifications You must be signed in to change notification settings

ojullien/Shell

Repository files navigation

Shell

Personal Shell scripting projects in bash. This package is a metapackage aggregating the following bash components (as submodules):

  • Core framework
    • sys contains scripts that offer useful functions.
  • Applications
    • autosave: Builds a timestamped compressed archive with system logs, web logs and send it to a ftp server.
    • autosavedb: Builds a timestamped compressed archive with databases data, and send it to a ftp server.
    • clean: Cleans the /var/log folder.
    • createdomain: Creates an apache user/group and a home directory in /var/www.
    • fillwithzeros: Fills disks with zero for compression (virtualization) and shutdown the server.
    • install: Configures a fresh debian/ubuntu installation.
    • manageservices: Disable, start or stop a list of services defined in the config.sh file.
    • pki: Simple Public Key Infrastructure (PKI) management toolkit.
    • savedb: Saves a database.
    • savesite: Saves a www site (located in /var/www).
    • savesystemconf: Saves a system configuration (located in /etc).
    • tartime: Tar and compress files to a timestamped bz2 archive. Standalone script located in bin folder.
    • updatesystem: Updates the system.

As I use these scripts for my own projects, they contain only the features I need.

Table of Contents

Installation | Documentation | Contributing | License

Installation

Require a Debian/Ubuntu version of linux and a Bash version ~4.4.

  1. Download a release or clone this repository using this command: git clone --recurse-submodules https://github.com/ojullien/Shell.
  2. Use scripts/install.sh to automatically install the project in the /opt/oju/bash folder.
  3. If needed, add PATH="$PATH:/opt/oju/bash/bin" to the .profile files.
  4. For each apps in /opt/oju/bash/app check out and edit the configuration file named config.sh.
  5. Run the app you want. In /opt/oju/bash/bin folder run ./<app_name>.sh or bash <app_name>.sh.

Documentation

I wrote and I use these scripts for my own projects. And, unfortunately, I do not provide exhaustive documentation. Please read the code and the comments ;)

Contributing

Thanks you for taking the time to contribute. If you wish to contribute, please read the CONTRIBUTING and CODE_OF_CONDUCT files.

License

This project is open-source and is licensed under the MIT License.