Skip to content

Commit

Permalink
Add create_readonly_utilix_config.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
dachengx committed Jan 31, 2024
1 parent b8c1771 commit 828c954
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/scripts/create_readonly_utilix_config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

if [ ! -z "$RUNDB_API_URL" ]
then
cat > $HOME/.xenon_config <<EOF
[basic]
logging_level=debug
[RunDB]
rundb_api_url = $RUNDB_API_URL
rundb_api_user = $RUNDB_API_USER_READONLY
rundb_api_password = $RUNDB_API_PASSWORD_READONLY
xent_url = $PYMONGO_URL
xent_user = $PYMONGO_USER
xent_password = $PYMONGO_PASSWORD
xent_database = $PYMONGO_DATABASE
pymongo_url = $PYMONGO_URL
pymongo_user = $PYMONGO_USER
pymongo_password = $PYMONGO_PASSWORD
pymongo_database = $PYMONGO_DATABASE
[scada]
scdata_url = $SCADA_URL
sclastvalue_url = $SCADA_VALUE_URL
sclogin_url = $SCADA_LOGIN_URL
straxen_username = $SCADA_USER
straxen_password = $SCADA_PWD
pmt_parameter_names = no_file_found
EOF
echo "YEAH boy, complete github actions voodoo now made you have access to our database!"
else
echo "You have no power here! Environment variables are not set, therefore no utilix file will be created"
fi

0 comments on commit 828c954

Please sign in to comment.