Code Monkey home page Code Monkey logo

automated-extras's Introduction

automated-extras

A collection of useful scripts and functions for the automated.sh tool. Some of the code may eventually end up in the automated.sh standard library.

Most of the functions have only been tested on CentOS7 only and might not work on other systems.

Example

example.sh:

set -euo pipefail

if [[ -n "${BASH_SOURCE[0]:-}" && "${0}" = "${BASH_SOURCE[0]}" ]]; then
    source automated-extras-config.sh

    exec automated.sh \
         --sudo \
         --load "${AUTOMATED_EXTRAS_LIBDIR}" \
         --load "${BASH_SOURCE[0]}" \
         "$@"
fi

main () {
    supported_automated_extras_versions 0.1

    pg_user_exists testuser || pg_createser testuser secret
}

Ensure the testuser PostgreSQL user exists on both machine1.example.com and machine2.example.com:

bash example.sh machine1.example.com machine2.example.com

Installing

From source

sudo make install

Packages for RedHat-based systems

cat <<"EOF" | sudo tee /etc/yum.repos.d/alikov.repo
[alikov]
name=alikov
baseurl=https://dl.bintray.com/alikov/rpm
gpgcheck=0
repo_gpgcheck=1
gpgkey=https://bintray.com/user/downloadSubjectPublicKey?username=bintray
enabled=1
EOF

sudo yum install automated-extras

Packages for Debian-based systems

curl 'https://bintray.com/user/downloadSubjectPublicKey?username=bintray' | sudo apt-key add -

cat <<"EOF" | sudo tee /etc/apt/sources.list.d/alikov.list
deb https://dl.bintray.com/alikov/deb xenial main
EOF

sudo apt-get update && sudo apt-get install automated-extras

automated-extras's People

Contributors

node13h avatar

Stargazers

Nicola Worthington avatar

Watchers

James Cloos avatar  avatar Nicola Worthington avatar

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.