mirror of
https://github.com/guezoloic/serverconfig.git
synced 2026-01-25 03:34:22 +00:00
fix: $ENV_DIR -> $ETC_DIR and add updated message
This commit is contained in:
@@ -67,8 +67,13 @@ create_env_variable() {
|
||||
local value="$2"
|
||||
|
||||
if [[ -z "$value" ]]; then
|
||||
datetime_print "$key not set (empty input)."
|
||||
return
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user