mirror of
https://github.com/guezoloic/serverconfig.git
synced 2026-01-25 03:34:22 +00:00
feat: update $isUpdated statement and remove www.{HOSTNAME}
This commit is contained in:
@@ -83,6 +83,12 @@ create_env_variable() {
|
||||
echo "$key=$value" >> "$file"
|
||||
info_print "$key set." $SUCCESS_FLAG
|
||||
fi
|
||||
else
|
||||
if grep -Eq "^${key}=" "$file" 2>/dev/null; then
|
||||
sed -i "s/^$key=.*/$key=$value/" "$file"
|
||||
else
|
||||
echo "$key=$value" >> "$file"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user