#!/bin/sh

@SYSCONFBASE@/rc.d/redmine50_unicorn.sh status > /dev/null 2>&1

if [ $? -eq 0 ]; then
	echo 'Please, stop Redmine unicorn before running this script.'
	exit 1
fi

cd /usr/pkg/share/ruby31-redmine50

/usr/pkg/bin/ruby31 bin/rake redmine:plugins:migrate RAILS_ENV=production
