#!/bin/bash

get_all_env(){
  count=0
  while IFS= read -r line;do
    count=$(( count + 1 ))
  done < "/etc/environment"

  current_line=0
  current_string=""
  string=" "

  while IFS= read -r line;do
    current_line=$((current_line+1))
    line=${line#export }
    current_string=$line
    if [[ $current_line -lt $count ]];then
      current_string=$current_string$string
      env_list=$env_list$current_string
    else
      env_list=$env_list$line
    fi
  done < "/etc/environment"
  echo "$env_list"
}

SYSLOG_TAG="vz_amx_init"

_log(){
  logger -t "$SYSLOG_TAG" "$*"
}
