#/bin/bash set -e if [ "${UID}" = "" ] || [ "${GID}" = "" ]; then echo "UID or GID environment variable not set, cannot start SMART Notebook!" exit 1 fi if [ "${USER}" = "" ] || [ "${USER}" = "root"]; then echo "USER variable is not properly set, current value: ${USER}" exit 1 fi if [ "${HOME}" = "" ]; then echo "HOME variable not set!" exit 1 fi # Create user and group groupadd -g ${GID} user useradd ${USER} -d ${HOME} -s /bin/bash -u ${UID} -g ${GID} sudo -Eu ${USER} "/opt/SMART Technologies/Notebook Software/bin/Notebook/notebook" ${SMART_ARGS}