Orchid

Logo

Orchid is a bash script aimed to make life easier for geeks & sysadmins.

View the Project on GitHub UpVent/orchid

Orchid - Easy Server Management

This is a documentation page. For project information please go to the project page

Disclaimer: Orchid is what you can call a “Server Management Swiss Knife” and should not be confused with the same capabilities of server automation software like Ansible or control panels like Webmin. Orchid is just for reducing the most common steps in server applications setup, quick management and deploy.

Orchid is a script written in closest possible POSIX bash. This script aims to provide an easy way to manage, create, destroy or deploy common server applications. Orchid also lets you compile kernels and provides basic hardening fot common depoyed applications.

“The second record was called Morningrise”

Orchid was a personal server program originally written in C that tried to automate (or reduce keystrokes) in common server tasks on Debian based servers, due to it’s unstable nature it crashed and caused a lot of trouble since it had poorly written C syscalls and code.

UpVent is now taking charge of this program, porting it completely to Bash.

Project layout

Orchid works in a modular way, since all of the “breeds” mentioned are really detachable separate bash files that can be modified, added or deleted without any problem as long as the bash syntax is correct.

Orchid has the current layout

.
├── LICENSE
├── README.md
├── breeds
│   ├── module1
│   ├── module2
│   └── module3
├── lib
│   └── requiem
├── logo.png
├── man
│   └── orcd
└── orcd

Let’s cover the following files and directories in short to understand the orchid project structure:

How does Orchid auto-detects modules? Why is it so small?

Believe it or not Orchid is a 38-line only project. That’s it. Just 38 lines of Bash code to make this awesome server swiss knife.

All the magic happens within this function which searches and indexes the current modules (breeds) under the breeds/ directory.

    for i in "${OPATH}"/breeds/*; do
        [ ! -L "$i" -a -f "$i" ] && echo "            ${i##*/}"
    done

    [ "${OPTIONS}" == "help" ] && exit 0 || exit 1
   
}

OPTIONS=$1; shift;

[ ! -f "${OPATH}/breeds/${OPTIONS}" ] && use
"${OPATH}"/breeds/"${OPTIONS}" "$@"

This keeps orchid as a Very lightweight program and the slow tasks can be assigned to the modules instead such as installing, setting up or quick-managing server side software.

Current Modules

Image Name Functions
Apache Logo Apache [ on, off, restart, debug, new, del, backup ]
NGINX Logo NGINX [ on, off, restart, debug, new, del ]
Storage Storage [ ls, status, fs, unplug, check, repair, help ]