#!/bin/sh

post_upgrade() {
  if [ "$(vercmp $2 0.1.0.0)" -lt 0 ]; then
    echo "Major upgrade of s6-rc and s6-frontend."
    echo "The s6-rc database will be recompiled and then upgraded to the new format."
    s6 repository init -U
    s6 set commit -f
    s6-rc-format-upgrade /etc/s6/repo/compiled/current
    s6 live install
  fi
}
