Skip to content

Commit

Permalink
Pre-start hook should support python3 as well as 2.
Browse files Browse the repository at this point in the history
  • Loading branch information
obmarg committed Oct 31, 2017
1 parent c38ba2d commit d438832
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rel/hooks/pre-start.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash

echo "Initializing secure erlang distribution cookie..."
NEW_COOKIE=$(python -c "import base64; import os; print(base64.urlsafe_b64encode(os.urandom(64)).replace('/', '_'))")
NEW_COOKIE=$(python -c "import base64; import os; rand = os.urandom(64); print(base64.urlsafe_b64encode(os.urandom(64)).replace(b'/', b'_'))")
sed -e "s/^-setcookie.*/-setcookie $NEW_COOKIE/" -i".insecure" "$VMARGS_PATH"

0 comments on commit d438832

Please sign in to comment.