#!/bin/sh

@SYSCONFBASE@/rc.d/redmine60_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/ruby32-redmine61

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