Skip to content

Commit

Permalink
Update wordpress-jail.sh
Browse files Browse the repository at this point in the history
Enclose passwords in quotes to avoid errors due to ambiguous password characters
  • Loading branch information
basilhendroff authored Oct 25, 2020
1 parent 0c6e5d9 commit 32b1187
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wordpress-jail.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ if ! [ -e "/root/${JAIL_NAME}_db_password.txt" ]; then
DB_PASSWORD=$(rand 24)

# Save passwords for later reference
echo "DB_ROOT_PASSWORD=${DB_ROOT_PASSWORD} # user=root" > /root/${JAIL_NAME}_db_password.txt
echo "DB_PASSWORD=${DB_PASSWORD} # user=wordpress" >> /root/${JAIL_NAME}_db_password.txt
echo 'DB_ROOT_PASSWORD="'${DB_ROOT_PASSWORD}'" # user=root' > /root/${JAIL_NAME}_db_password.txt
echo 'DB_PASSWORD="'${DB_PASSWORD}'" # user=wordpress' >> /root/${JAIL_NAME}_db_password.txt
else
# Check for the existence of password variables
. "/root/${JAIL_NAME}_db_password.txt"
Expand Down

0 comments on commit 32b1187

Please sign in to comment.