How do I run a command at startup please?

When my system boots, I want to mount a ramdisk by running the following command:

mount -t tmpfs -o size=1G ramdisk /mnt/temporary/frigate/tmpfs

I have already created the tmpfs (my TrueNAS had a fault but I worked round it by doing mount -t tmpfs -o size=1G ramdisk /mnt/temporary/frigate/tmpfs which seems to have persisted through several reboots over the last few months).

Please can you show me how to go about it? I looked in “advanced settings” but I felt apprehensive and decided to get some advice first!

What you’re looking for is a postinit script
It’s under system ->advanced

Thanks Lars - that was pretty straight forward!