1 2 3 4 5 6 7 8 9 10
#!/bin/bash set -e cd /usr/share/webapps/mattermost if [[ "$USER" = "mattermost" ]]; then exec bin/platform "$@" else exec sudo -u mattermost bin/platform "$@" fi