avmtrf1-tools 0.21.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89f627b37b3f45e6f90225032f2f557d33aae6667ff9f46ab9d8829417f31b63
4
- data.tar.gz: 2e6047ab9551c3794b23a5f7284cb359905145027ebc136dd783d0774644c1e5
3
+ metadata.gz: d8bccc6c4cb6523d0317726266275394779bc7197c48816818e481f6220179c4
4
+ data.tar.gz: 63d1a3ee1390c28b63754fdd843d7c7a16d08a51892aaac5f475db7d29db0f46
5
5
  SHA512:
6
- metadata.gz: 72567aa6c6f4765585988f0d13fa931d51f5bac8d187695667aa906af25bbe87df6fe6fe4936c7f3858905f3cd09c72c6d967fa60b22f83ca9fd18cc9975ad6f
7
- data.tar.gz: c17ada0e1739ec3512dea811ae2eae4f72464a55898e7cdaf499327253493f2cfd2145000a0fda86b1535a991fdf42ff65f2a9e33ef82e600695f1e32e393e0a
6
+ metadata.gz: 64f9b323848fc332198cd8d137c65ee63d521a6a52029739863abe9b9b47d8f0c4ebe5a8a84faf05e2ee82df691cd6a63f248ceaf9f03e3d6b6e2b42fb4f3078
7
+ data.tar.gz: 547c3c71463934abdc0a6df478d31c7257e00b1cd6e4602b1b16f42f969928748de21ecc8f6c04a0986a66b74e56abdcd9c5c122434f62d822c35788ab4ce63d
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avmtrf1
4
4
  module Tools
5
- VERSION = '0.21.0'
5
+ VERSION = '0.22.0'
6
6
  end
7
7
  end
@@ -0,0 +1,41 @@
1
+ #!/bin/bash
2
+
3
+ set -u
4
+ set -e
5
+
6
+ SOURCE="${BASH_SOURCE[0]}"
7
+ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
8
+ DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
9
+ SOURCE="$(readlink "$SOURCE")"
10
+ [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
11
+ done
12
+ DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
13
+ source "$DIR/init.sh"
14
+
15
+ function php_values_envvars() {
16
+ set +e
17
+ printenv | grep '^PHP_VALUE_'
18
+ set -e
19
+ }
20
+
21
+ function php_value_directive_name() {
22
+ printf '%s' "$1" | sed 's/=.*$//g' | sed 's/^PHP_VALUE_//g' | tr '[:upper:]' '[:lower:]' | \
23
+ sed 's/__/\./g'
24
+ }
25
+
26
+ function php_value_directive_value() {
27
+ printf '%s' "$1" | sed 's/^.*=//g'
28
+ }
29
+
30
+ infom 'Procurando por valores para diretivas PHP...'
31
+ INI_FILE="$PHP_INI_DIR/conf.d/avmtrf1-tools.ini"
32
+ cp /dev/null "$INI_FILE"
33
+ php_values_envvars | while read ENVVAR; do
34
+ NAME="$(php_value_directive_name "$ENVVAR")"
35
+ VALUE="$(php_value_directive_value "$ENVVAR")"
36
+ infov "$NAME" "$VALUE"
37
+ echo "${NAME}=${VALUE}" >> "$INI_FILE"
38
+ done
39
+
40
+ infom "Conteúdo de \"$INI_FILE\":"
41
+ cat "$INI_FILE"
@@ -15,6 +15,7 @@ source "$DIR/init.sh"
15
15
  "$AUX_ROOT/config_banner.sh"
16
16
  "$AUX_ROOT/apache_user.sh"
17
17
  "$AUX_ROOT/setup_apache_site.sh"
18
+ "$AUX_ROOT/php_values.sh"
18
19
  "$AUX_ROOT/pear.sh"
19
20
  "$AUX_ROOT/php_composer.sh"
20
21
  "$AUX_ROOT/laravel.sh"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avmtrf1-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0
4
+ version: 0.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo H. Bogoni
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-06 00:00:00.000000000 Z
11
+ date: 2020-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aranha-parsers
@@ -359,6 +359,7 @@ files:
359
359
  - template/avmtrf1/php/docker_image/aux/lib.sh
360
360
  - template/avmtrf1/php/docker_image/aux/pear.sh
361
361
  - template/avmtrf1/php/docker_image/aux/php_composer.sh
362
+ - template/avmtrf1/php/docker_image/aux/php_values.sh
362
363
  - template/avmtrf1/php/docker_image/aux/setup_apache_site.sh
363
364
  - template/avmtrf1/php/docker_image/aux/start.sh
364
365
  - template/avmtrf1/php/docker_image/aux/templates/apache_site.conf