refs #2448 derive a strong password from the default opengnsys weak one #87
|
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [0.25.1] - 2025-07-11
|
||||
|
||||
### Changed
|
||||
|
||||
- Derive a strong password from the default opengnsys weak one
|
||||
|
||||
## [0.25.0] - 2025-07-11
|
||||
|
||||
## Added
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
F=/etc/filebeat/filebeat.yml
|
||||
OGLOG_PORT=9200
|
||||
OPENSEARCH_PORT=9200
|
||||
|
||||
if [ -f $F ]; then
|
||||
PASS=$(grep "^[ ]*\(export \)\?OPTIONS=" /scripts/ogfunctions 2>&1 |sed 's/\(.*\)pass=\(\w*\)\(.*\)/\2/') ## taken from a sibling script
|
||||
PASS=${PASS:-"og"}
|
||||
PASS=OG+$(echo -n $PASS |sha256sum |cut -c1-12) ## og KDF
|
||||
chmod 0600 $F
|
||||
sed -i -e "s/__OGLOG_IP__/$oglog/g" \
|
||||
-e "s/__OGLOG_PORT__/$OGLOG_PORT/g" \
|
||||
-e "s/__OPENSEARCH_PASSWORD__/$PASS/g" \
|
||||
sed -i -e "s/__OGLOG_IP__/$oglog/g" \
|
||||
-e "s/__OGLOG_PORT__/$OPENSEARCH_PORT/g" \
|
||||
-e "s/__OPENSEARCH_PASSWORD__/$PASS/g" \
|
||||
$F
|
||||
unset PASS
|
||||
|
||||
|
|
Loading…
Reference in New Issue