#!/bin/sh
# if [ "x$(id -un)" != "xredmine" ] ; then
#   echo "Please run this script as redmine user" 1>&2
#   exit 1
# fi
export RAILS_ENV="${RAILS_ENV:=production}"
cd /srv/www/vhosts/redmine/
/usr/bin/bundle.ruby2.5 exec /usr/bin/rake.ruby2.5 db:migrate assets:clean assets:precompile redmine:plugins:assets redmine:plugins:migrate
chown -R redmine:redmine tmp/ public/plugin_assets/
chmod -R go+rX,o-w public/
