Skip to content

Commit

Permalink
Re-init encfs
Browse files Browse the repository at this point in the history
  • Loading branch information
jzombie committed Jul 31, 2024
1 parent 0bc8e3d commit 04970d7
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions mosquitto/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,18 @@ if [ -z "$ENCFS_PASSWORD" ]; then
exit 1
fi

# TODO: Uncomment
# # Initialize or mount the encrypted filesystem as the mosquitto user
# if [ ! -f /encrypted/.encfs6.xml ]; then
# echo "Initializing encrypted filesystem"
# su mosquitto -c "echo \"$ENCFS_PASSWORD\" | encfs --standard --stdinpass /encrypted /var/lib/mosquitto --verbose"
# else
# echo "Mounting encrypted filesystem"
# su mosquitto -c "echo \"$ENCFS_PASSWORD\" | encfs --stdinpass /encrypted /var/lib/mosquitto --verbose"
# fi
# Initialize or mount the encrypted filesystem as the mosquitto user
if [ ! -f /encrypted/.encfs6.xml ]; then
echo "Initializing encrypted filesystem"
su mosquitto -c "echo \"$ENCFS_PASSWORD\" | encfs --standard --stdinpass /encrypted /var/lib/mosquitto --verbose"
else
echo "Mounting encrypted filesystem"
su mosquitto -c "echo \"$ENCFS_PASSWORD\" | encfs --stdinpass /encrypted /var/lib/mosquitto --verbose"
fi

# # # Debug: Check if encfs is mounted
# echo "Checking if encfs is mounted:"
# mount | grep encfs || echo "encfs is not mounted"
# # Debug: Check if encfs is mounted
echo "Checking if encfs is mounted:"
mount | grep encfs || echo "encfs is not mounted"

# Move .encfs6.xml to the config directory
mv /encrypted/.encfs6.xml /config/
Expand Down

0 comments on commit 04970d7

Please sign in to comment.