Commit f8d1e3eb authored by Ophélie Gagnard's avatar Ophélie Gagnard

Use key and certificate in flb.conf

Use slapos key and certificate instead of Wendelin user and password.
Use get computer_id for Wendelin reference in ```/etc/opt/slapos/slapos.cfg```.
parent 06fe86c8
......@@ -3,12 +3,11 @@
. /lib/dracut-lib.sh
source $NEWROOT/etc/rapid.space/get-network.sh
WENDELIN_REFERENCE=$(cat $NEWROOT/etc/rapid.space/wendelin_reference)
WENDELIN_USER=$(cat $NEWROOT/etc/rapid.space/wendelin_user)
SLAPOS_CFG_FILE="$NEWROOT"/etc/opt/slapos/slapos.cfg
WENDELIN_REFERENCE=$(sed -n '/computer_id = /p' "$SLAPOS_CFG_FILE" | cut -d' ' -f3)
SCAN_FILE=/var/log/metadata_collect.log
sed -i "s|%SCAN_FILE%|$SCAN_FILE|g;s/%WENDELIN_REFERENCE%/$WENDELIN_REFERENCE/g;s/%WENDELIN_USER%/$WENDELIN_USER/g" /etc/flb.conf
sed -i "s|%SCAN_FILE%|$SCAN_FILE|g;s/%WENDELIN_REFERENCE%/$WENDELIN_REFERENCE/g;s/%NEWROOT%/$NEWROOT/g" /etc/flb.conf
SCAN_FILE=/var/log/metadata_collect.log
timestamp_cmd='date +"%Y/%m/%d %H:%M %Z"'
/sbin/fluent-bit -e /etc/libfluentbit_wendelin.so -c /etc/flb.conf &
flb_pid=$!
......
......@@ -4,6 +4,6 @@
# sometimes .cer works, sometimes .crt works... it dependes on the UEFI?
export CERT_NAME=db.crt
export SERVER_GROUP=douai
#export WENDELIN_URL=
#export WENDELIN_USER=
#export WENDELIN_PWD=
export WENDELIN_URL=https://slap.vifib.com/
export SLAPOS_KEY_FILE=%NEWROOT%/etc/opt/slapos/ssl/key
export SLAPOS_CERT_FILE=%NEWROOT%/etc/opt/slapos/ssl/certificate
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment