You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
582 B
23 lines
582 B
1 year ago
|
#/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}
|