Script after reset

hi, i would need to manage a remote device (hEX), i need to reset configuration (no-default) and then import a script rsc.
Is it possible to do arrange this?
Thank you for your help

Sure, just place delay=1m to the beginning of the .rsc file to be imported, otherwise some commands may fail because some interfaces may not be detected yet at the moment when the script refers to them. Also, some models have the disk space split between a ramdisk and NVRAM, and the NVRAM is accessible as flash/, I don’t know whether hEX falls to this group. So upload a file there and just reboot the machine; if the file is still there after the reboot, it’s OK, if it disappears, you have to use a flash/ prefix to the file name.

Regarding no-defaults=yes, the exports normally expect some configuration items to exist, so I’m not sure whether it is actually necessary.

/system reset-configuration run-after-reset=flash/your-modified-config.rsc keep-users=yes