avmtrf1-tools 0.22.3 → 0.23.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6078aba43a0604a9f62e78372fa7481e82b4b8ea08c2f2cdf18c5f99c0830181
4
- data.tar.gz: f318d1029c13baedf217bd1dfe9d210a499197c987737c6df699efc206b0b1e0
3
+ metadata.gz: 7c5d0fa004a2d103636c175eae7e9e01fb7ec24f9965b65b4ade79e56670b52a
4
+ data.tar.gz: 27462098cfe8fa41220eae304ad6626fd3ade431bcc30e27f2a0404a9d8accf3
5
5
  SHA512:
6
- metadata.gz: 474fa9e0b6ea49b56ad0223c10bbe0d640121107304e58763a65305d7b845c10c46eb5c4a7ea96a1939e668691c7ee9acb7dee5cfda297a74d7e7f57293cf346
7
- data.tar.gz: 7f97a4240b49093fd54fbabc57b917949c3c4adc302f9a6dfcd0c77e3585bc008859c6907759f910570352b8a738947321bafd67f1e7f4f9c9a7ae2dd0ba5a33
6
+ metadata.gz: c7a0da2bf61dca3105234aaa66d40c42cc77df67cc70cbe480c120a0ef75159ff5cc6df16a038f0e0cd50b3a9d7ac20496101b1224cd6e1654e48b61d5bcb4d6
7
+ data.tar.gz: 7dc39b64470ec1a03f43987d646b234b1791c10dd1928833e5149629b6784602e5dd346bbf3953b4ae55f64b38617f86b344d17102d2be4ca5cd676cab9de772
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Avmtrf1
4
4
  module Tools
5
- VERSION = '0.22.3'
5
+ VERSION = '0.23.0'
6
6
  end
7
7
  end
@@ -12,23 +12,23 @@ done
12
12
  DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
13
13
  source "$DIR/init.sh"
14
14
 
15
- if user_exist_by_id "$APACHE_USER_ID"; then
16
- infom "ID de usuário \"$APACHE_USER_ID\" já existe"
15
+ if user_exist_by_id "$APP_USER_ID"; then
16
+ infom "ID de usuário \"$APP_USER_ID\" já existe"
17
17
  elif user_exist_by_name "$APACHE_USER_NAME"; then
18
18
  infom "Alterando ID do usuário \"$APACHE_USER_NAME\"..."
19
- usermod --uid "$APACHE_USER_ID" "$APACHE_USER_NAME"
19
+ usermod --uid "$APP_USER_ID" "$APACHE_USER_NAME"
20
20
  else
21
21
  infom "Criando usuário \"$APACHE_USER_NAME\"..."
22
- useradd --uid "$APACHE_USER_ID" "$APACHE_USER_NAME"
22
+ useradd --uid "$APP_USER_ID" "$APACHE_USER_NAME"
23
23
  fi
24
24
 
25
- if [[ "$APACHE_USER_ID" == '0' ]]; then
26
- infom "\$APACHE_USER_ID é 0 (root). Apache executará com usuário padrão (Nenhuma alteração)"
25
+ if [[ "$APP_USER_ID" == '0' ]]; then
26
+ infom "\$APP_USER_ID é 0 (root). Apache executará com usuário padrão (Nenhuma alteração)"
27
27
  else
28
28
  infom "Configurando usuário/grupo de execução do Apache..."
29
- export APACHE_RUN_USER="$(id -nu "$APACHE_USER_ID")"
29
+ export APACHE_RUN_USER="$(id -nu "$APP_USER_ID")"
30
30
  export APACHE_RUN_GROUP="$(id -ng "$APACHE_RUN_USER")"
31
31
  infov "Execução do Apache"
32
- infov ' * $APACHE_RUN_USER' "$APACHE_RUN_USER (ID: $APACHE_USER_ID)"
32
+ infov ' * $APACHE_RUN_USER' "$APACHE_RUN_USER (ID: $APP_USER_ID)"
33
33
  infov ' * $APACHE_RUN_GROUP' "$APACHE_RUN_GROUP (ID: $(id -g "$APACHE_RUN_USER"))"
34
34
  fi
@@ -16,5 +16,5 @@ infov 'Application root path ($APP_ROOT)' "$APP_ROOT"
16
16
  infov "Apache\'s document root (\$DOCUMENT_ROOT)" "$DOCUMENT_ROOT"
17
17
  infov 'PHP Composer directories ($COMPOSER_PATH)' "$COMPOSER_PATH"
18
18
  infov 'Laravel directories ($LARAVEL_PATH)' "$LARAVEL_PATH"
19
- infov 'Apache user ID' "$APACHE_USER_ID"
19
+ infov 'Apache user ID' "$APP_USER_ID"
20
20
  infov 'Run Apache? ($RUN_APACHE)' "$RUN_APACHE"
@@ -35,5 +35,5 @@ text_set 'PEAR_PACKAGES' ''
35
35
  # Execução do Apache
36
36
  bool_set 'RUN_APACHE' true
37
37
 
38
- # ID do usuário Apache
39
- text_set 'APACHE_USER_ID' "$(stat -c '%g' "$APP_ROOT")"
38
+ # ID do usuário da aplicação
39
+ text_set 'APP_USER_ID' "$(stat -c '%g' "$APP_ROOT")"
@@ -19,7 +19,7 @@ function run_composer() {
19
19
  if [[ ! -f "$COMPOSER_FILE" ]]; then
20
20
  fatal_error "Arquivo \"$COMPOSER_FILE\" (\$COMPOSER_PATH) não encontrado"
21
21
  fi
22
- composer install "--working-dir=$COMPOSER_DIR"
22
+ su "$(id -nu "$APP_USER_ID")" -c "composer install '--working-dir=$COMPOSER_DIR'"
23
23
  }
24
24
 
25
25
  infom "Executando \"composer install\" nos diretórios de \"$COMPOSER_PATH\"..."
@@ -13,12 +13,12 @@ DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
13
13
  source "$DIR/init.sh"
14
14
 
15
15
  "$AUX_ROOT/config_banner.sh"
16
+ source "$AUX_ROOT/apache_user.sh"
16
17
  "$AUX_ROOT/setup_apache_site.sh"
17
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"
21
- source "$AUX_ROOT/apache_user.sh"
22
22
  if bool_r "$RUN_APACHE"; then
23
23
  "$AUX_ROOT/apache_foreground.sh"
24
24
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avmtrf1-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.3
4
+ version: 0.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo H. Bogoni