mirror of
https://github.com/guezoloic/serverconfig.git
synced 2026-01-25 04:34:23 +00:00
fix: $ENV_DIR -> $ETC_DIR and add updated message
This commit is contained in:
@@ -67,9 +67,14 @@ create_env_variable() {
|
||||
local value="$2"
|
||||
|
||||
if [[ -z "$value" ]]; then
|
||||
if grep -q "^$key=*" "$ENV_FILE" 2>/dev/null; then
|
||||
datetime_print "$key not updated."
|
||||
return
|
||||
else
|
||||
datetime_print "$key not set (empty input)."
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
if grep -q "^$key=" "$ENV_FILE" 2>/dev/null; then
|
||||
if $AUTO_CONFIRM; then
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
FILENAME="serverconfig"
|
||||
|
||||
ETC_DIR="/etc/$FILENAME"
|
||||
ENV_FILE="$ENV_DIR/.env"
|
||||
ENV_FILE="$ETC_DIR/.env"
|
||||
LOG="/var/log/$FILENAME.log"
|
||||
|
||||
DATETIME_FORMAT="%d-%m-%Y %H:%M:%S"
|
||||
|
||||
Reference in New Issue
Block a user