blob: f333d27bf2b886a5a7ece2aef21ff5bcc82280c7 [file]
#!/bin/sh
set -eu
STATE_DIR="${STATE_DIR:-state}"
if [ -d "$STATE_DIR/hypercorn/secrets" ]
then
find "$STATE_DIR/hypercorn/secrets" -type f ! -perm 400 -exec chmod 400 {} +
fi
if [ -d "$STATE_DIR/secrets" ]
then
find "$STATE_DIR/secrets" -type f ! -name "apptoken.txt" ! -perm 400 -exec chmod 400 {} +
find "$STATE_DIR/secrets" -type f -name "apptoken.txt" ! -perm 600 -exec chmod 600 {} +
fi