TVHeadend Pre-Processor CMD, send WOL

It is possible to get TVHeadend installed on CoreELEC to use a WOL script in the Pre-Processor CMD setting before recording something? I’d like this to be able to wake up my NAS where recordings are saved to.
My Linux skillz are 0, so I’m unsure what is needed of rights etc. for that to work.

Something like this maybe? GitHub - leestevetk/ - a simple Wake-on-LAN shell script