1[Unit]
2Description=TPM 2.0 Simulator
3#ConditionPathExists=!/dev/tpm0
4After=network.target
5
6[Service]
7Type=simple
8WorkingDirectory=/etc/tpmsim
9ExecStart=/src/ms-tpm-20-ref/TPMCmd/Simulator/src/tpm2-simulator
10ExecStartPost=/bin/sleep 1s
11ExecStartPost=/bin/tpm2_startup -T mssim:host=localhost,port=2321 -c
12KillMode=SIGKILL
13ExecStop=/bin/tpm2_shutdown -T mssim:host=localhost,port=2321 -c
14ExecStop=/bin/kill $MAINPID
15
16[Install]
17WantedBy=multi-user.target
18
19