#Shell Script - create simlink

1 messages · Page 1 of 1 (latest)

errant zephyr
#

Hello!

I'm trying to add a preview of the latest camera event to my dashboard. My setup is to use an automation that updates a simlink to the latest video, which my dashboard shows:

shell_command:
  update_latest_event_doorbell: >
    ln -sf $(ls -t /config/nest/event_media/b8c2af084c5d6ac3a16aa462296e1adf/*.mp4 | head -n 1) /config/www/camera_media/doorbell_latest.mp4

however, this command doesn't work. I'm not sure if I made a mistake in the command, don't have permissions in this context, or the directories are wrong. I'm not even sure where the command runs, I tried to remove the leading config directory, but that didn't work either.

Can someone more experienced give me some tips please? Thank you!