blob: 00fbf24a7a7cd40d0267bbe5b593114b98ff5135 [file] [log] [blame]
#!/bin/bash
set -e
# Start DBUS
mkdir -p /var/run/dbus
rm -f /var/run/dbus/*
stdbuf -oL -eL dbus-daemon --system --nofork 2>&1 1> /var/log/dbus-daemon.log &
sleep 1m
# Start Resource Manager
if [ -z $TPM_SIMULATOR ]; then
echo "Using TPM Hardware for the operations";
tpm2-abrmd
else
echo "Using TPM Simulator for the opeations";
hostip=$(ip route show | awk '/default/ {print $3}');
echo "Connecting to $hostip\n";
tpm2-abrmd -a $hostip -t socket
fi