项目作者: hilbix

项目描述 :
config generator in pure bash
高级语言: Shell
项目地址: git://github.com/hilbix/gen.git
创建时间: 2019-08-25T18:30:49Z
项目社区:https://github.com/hilbix/gen

开源协议:

下载


Currently this can be used to create configuration for NginX websites
with best practice (I hope).

Probably this will be extended in future to other things.

branch: cirrus

Config generator

This is a generator for complex configuration files.

  • Easy to use
  • Easy to extend
  • mostly pure bash (plus a few standard utilities)

All you need is to make love.

Usage

  1. git init conf
  2. cd conf
  3. git fetch https://github.com/hilbix/empty.git
  4. git reset FETCH_HEAD
  5. git tag empty
  6. git submodule add https://github.com/hilbix/gen.git
  7. git submodule update --init
  8. ln -s gen/Makefile .
  9. git add -A .
  10. git commit -m .

Example:

  1. ln -s gen/example.org gen/letsencrypt.http .
  2. make
  • It transforms all *.* files into out/ according to gen/std/.
  • You can adapt/override everything in the directory gen/

HowTo

FAQ

Hints?

WTF why?

  • Because keeping a fleet of sites with all those changing standards is a PITA.
  • Hence I needed something to bundle it.
  • The problem is with NginX not offering configuration macros, so you need some script to create the site include.

Why Makefiles?

  • Because I’m just too lazy. So I expect make to just do it for me.
  • Also Makefiles are excellent documentation of what is possible where

Bugs? Contact?

  • Issue on GitHub, eventually I listen.

Changes? Contrib?

  • PR on GitHub, eventually I listen.

License?

  • Are you kidding? This is an absolutely trivial basic open knowledge no-brainer!
  • In this universe there are some basic rules, and one is that things like this here cannot be copyrighted.
  • So this is Public Domain. Open speech. Rants. Whatever you like.
  • INTELLECTUAL PROPRIETARY RIGHTS ARE SLAVERY! Slavery must be abolished.

But ..

  • No! Definitively no. No buts, no objections, no nothing. No not no!
  • The scripting I did was done in a hurry. And there is absolutely nothing to it. Plain straight forward.
  • There was something needed to reduce the NginX config complexity. This is, what came out.
  • This all is a no-brainer. This text here is even more difficult to understand than the Makefile!
  • Please see this all here as just some mini-dump of a region of my brain, openly performed to an open audience.