ayaports/user/mastodon/bin-wrapper.in

15 lines
291 B
Text

#!/bin/sh
BUNDLE_DIR='/usr/lib/bundles/mastodon'
export RAILS_ENV='production'
export NODE_ENV='production'
export EXECJS_RUNTIME='Disabled'
cd $BUNDLE_DIR
if [ "$(id -un)" != 'mastodon' ]; then
exec su mastodon -c '"$0" "$@"' -- bin/__COMMAND__ "$@"
else
exec bin/__COMMAND__ "$@"
fi