Browse Source

refactoring

master
Simon Vieille 2 months ago
parent
commit
47e5b8c7e6
Signed by: Simon Vieille <simon@deblan.fr> GPG Key ID: 03383D15A1D31745
10 changed files with 11 additions and 4 deletions
  1. 3
    1
      .gitignore
  2. 5
    1
      Makefile
  3. 1
    1
      bin/vhost-add
  4. 0
    0
      etc/config.dist
  5. BIN
      helpers/twigc
  6. 0
    0
      share/bin/form_choices
  7. 0
    0
      share/bin/form_input
  8. 0
    0
      share/bin/form_yes_no
  9. 0
    0
      share/bin/template
  10. 2
    1
      src/templates/vhost-http.twig

+ 3
- 1
.gitignore View File

@@ -1 +1,3 @@
/helpers/crypt
/etc/config
/share/bin/crypt
/share/bin/twigc

+ 5
- 1
Makefile View File

@@ -1,4 +1,8 @@
all: install

install: build-crypt
wget -q -O ./share/bin/twigc https://github.com/okdana/twigc/releases/download/v0.3.1/twigc.phar
chmod +x ./share/bin/twigc

build-crypt:
gcc -lcrypt ./src/crypt/crypt.c -o ./helpers/crypt
gcc -lcrypt ./src/crypt/crypt.c -o ./share/bin/crypt

+ 1
- 1
bin/vhost-add View File

@@ -2,7 +2,7 @@

export SCRIPT_NAME="$(realpath "$0")"
export SCRIPT_PATH="$(dirname "$SCRIPT_NAME")"
export PATH="$SCRIPT_PATH/../helpers/:$PATH"
export PATH="$SCRIPT_PATH/../share/bin/:$PATH"

cd "$SCRIPT_PATH/../"


etc/config → etc/config.dist View File


BIN
helpers/twigc View File


helpers/form_choices → share/bin/form_choices View File


helpers/form_input → share/bin/form_input View File


helpers/form_yes_no → share/bin/form_yes_no View File


helpers/template → share/bin/template View File


+ 2
- 1
src/templates/vhost-http.twig View File

@@ -10,7 +10,8 @@
ErrorLog /services/web/logs/{{ DOMAIN }}.log
CustomLog /services/web/logs/{{ DOMAIN }}.log combined
{% block force_https %}{% if WEB_HTTPS_FORCE == "yes" %}
Redirect permanent / https://{{ DOMAIN }}/{% endif %}{% endblock %}
Redirect permanent / https://{{ DOMAIN }}/
{% endif %}{% endblock %}

<Directory {{ DOCUMENT_ROOT }}>
Options -Indexes +FollowSymLinks +MultiViews

Loading…
Cancel
Save