In the end I went down the route of having a script in init.d.
An example script ("my-script") follows for the benefit of anyone interested. It should be /etc/init.d, owned by root, chmod +x. Then sudo update-rc.d my-script defaults .. creates the relevant symlinks, although for my purposes I'll have to add those symlinks into my tar backup so they get installed automatically.
Mark
#!/bin/bash # my-script Example startup script # # Version: @(#)my-script 1.00 10-Mar-2016 mark@xxx # # Patches:
### BEGIN INIT INFO # Provides: my-script # Required-Start: $local_fs # Required-Stop: # Should-Stop: # Default-Start: S # X-Start-Before: # Default-Stop: 0 6 ### END INIT INFO
case $1 in start|restart) # Some stuff here ;; stop) # Some stuff here, if I want ;; status|info) # Some stuff here, if I want ;; *) # Some stuff here, if I want ;; esac exit 0