#!/bin/sh BUNDLE_DIR='/usr/share/webapps/freescout' cd $BUNDLE_DIR if [ "$(id -un)" != 'freescout' ]; then exec su freescout -c '"$0" "$@"' -- php artisan "$@" else exec php artisan "$@" fi