Need to run a script every time the system boots

Need to run a script every time the system boots something like login scripts. Since everything is read only in the Ubuntu Core 16 apart from my home directory. How do I make this happen

you create a daemon snap …

here are two examples of snaps running just one script on boot: