#!/usr/bin/env bash

if [ -n "$AUTO_LOGIN_HOME" ] ; then
	# sleep 2
	. "$AUTO_LOGIN_HOME/config"
	token=$(python "$AUTO_LOGIN_HOME/onetimepass.py")
	# echo ${token}
	expectlogin.sh ${username} ${password} ${host} ${token}
else
	echo "AUTO_LOGIN_HOME not config"
	. config
	token=$(python onetimepass.py)
	./expectlogin.sh ${username} ${password} ${host} ${token}
fi	