Skip to content
Snippets Groups Projects
Commit 7741feb5 authored by Thibault VINCENT's avatar Thibault VINCENT
Browse files

fix wrote python code in shell script

parent 51b89674
No related branches found
No related tags found
No related merge requests found
......@@ -8,13 +8,13 @@ if [ -f "$CONF" ]; then
# replace login by hostname if unset
if grep '\$\$LOGIN\$\$' "$CONF" >/dev/null; then
login=$(hostname)
print "*** CC-Node login : ${login}"
echo "*** CC-Node login : ${login}"
sed -e "s/\\\$\\\$LOGIN\\\$\\\$/${login}/g" -i "$CONF"
fi
# generate a random password if unset
if grep '\$\$PASSWORD\$\$' "$CONF" >/dev/null; then
password=$(cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 12)
print "*** CC-Node password : ${password}"
echo "*** CC-Node password : ${password}"
sed -e "s/\\\$\\\$PASSWORD\\\$\\\$/${password}/g"\
-i "$CONF"
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment