File: //proc/self/root/etc/profile.d/KutHupStart-TESTJS72184235756529.sh
#
# Run KutHupstart.sh for console logins. This script runs KaUsrTsk in
# session mode for console logins.
#
# Copyright 2013 Kaseya. All rights reserved.
#
LOG=/tmp/kut-huptest.log
TTY=$(tty)
AIP=/opt/Kaseya/TESTJS72184235756529
if [ -f "$AIP/tmp/kutMask" ]
then
Debug=true
fi
syslog() {
[ "$Debug" == "true" ] && logger -t "[KutHupStart.sh]" -p "user.debug" "$1"
}
# Note: The installer should set AIP during installation. If its empty here, something
# has gone wrong in the installation.
if [ -n "$AIP" ]
then
case "$TTY" in
/dev/tty*)
if [ "$(uname -m)" == "x86_64" ]
then
MTYPE=64
fi
# Only do this for bash, as other shells (sh and dash) don't support huponexit.
if [ "$SHELL" == "/bin/bash" -a -x "$AIP/libexec$MTYPE/KaUsrTsk" ]
then
shopt -s huponexit
syslog "Starting KaUsrTsk in session mode from KutHupStart."
$AIP/libexec$MTYPE/KaUsrTsk --session --hupstart 2> /dev/null > /dev/null &
fi
;;
esac
fi