#!/bin/bash set -e # Ensure the logs directory has the correct permissions echo "Changing permissions on logs directory" #chown -R appuser:appuser /app/logs chmod -R 777 /app/logs # Switch to appuser and execute the command passed to the script exec su -- appuser -c "$@"