ayaports/user/loomio/bin-wrapper.in

16 lines
342 B
Text
Raw Permalink Normal View History

2024-01-11 21:38:45 +00:00
#!/bin/sh
BUNDLE_DIR='/usr/lib/webapps/loomio'
export RAILS_ENV='production'
export NODE_ENV='production'
export EXECJS_RUNTIME='Disabled'
cd $BUNDLE_DIR
install -m 700 -o loomio -g loomio -d "$(readlink ./tmp)"
if [ "$(id -un)" != 'loomio' ]; then
exec su loomio -c '"$0" "$@"' -- bin/__COMMAND__ "$@"
else
exec bin/__COMMAND__ "$@"
fi