#!/bin/sh
#
# Perform necessary kontena setup steps
# after package is installed.
#

PROGNAME=`basename $0`

error_exit()
{
  echo "${PROGNAME}: ${1:-"Unknown Error"}" 1>&2
  exit 1
}

chown $USER /opt/kontena/embedded/bin
chown $USER -R /opt/kontena/embedded/lib/ruby/gems/2.1.0
mkdir -p /usr/local/bin
ln -s /opt/kontena/bin/kontena /usr/local/bin/kontena

echo "Thank you for installing Kontena!"

exit 0
