Kodi on-off based on Tv status (created script, need some help)

i dont have amhdmitx folder in /sys/class