#!/bin/sh
if [ -z "${IPKG_INSTROOT}" ]; then
  chown baresip:baresip /etc/baresip/accounts /etc/baresip/config /etc/baresip/contacts

  # Prevent baresip from auto-starting after an upgrade. The modules may
  # not be upgraded yet and the user configuration may need a revision.
  sed -i '/^ENABLE_BARESIP="yes"/s/^/#/' /etc/default/baresip
fi
exit 0
