UNCLASSIFIED

Commit ca7787ef authored by Mark Hermeling's avatar Mark Hermeling
Browse files

Change from hard-coded default password to generated default passwd

parent fbb32b5e
Pipeline #207687 canceled with stages
in 6 seconds
#!/bin/sh #!/bin/sh
echo "Starting hub in /home/codesonar/hub" if test -f "/home/codesonar/hub/hubpwd"; then
echo -e "$1\n$1\n" | /opt/codesonar/codesonar/bin/codesonar hub-start /home/codesonar/hub 0.0.0.0:7340 echo "Starting hub in /home/codesonar/hub with existing pwd"
echo "Hub password is $1" /opt/codesonar/codesonar/bin/codesonar hub-start /home/codesonar/hub 0.0.0.0:7340
else
HUB_DEFAULT_PWD=$(date +%s | base64 | head -c 32)
echo "${HUB_DEFAULT_PWD}" > /home/codesonar/hub/hubpwd
chmod 600 /home/codesonar/hub/hubpwd
echo "Starting hub with new hub password: ${HUB_DEFAULT_PWD}"
echo -e "${HUB_DEFAULT_PWD}\n${HUB_DEFAULT_PWD}\n" | /opt/codesonar/codesonar/bin/codesonar hub-start /home/codesonar/hub 0.0.0.0:7340
fi
echo "Hub started..." echo "Hub started..."
while [ 1 ] while [ 1 ]
......
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