I would like to execute this shell script at reboot and shut down:
#!/bin/sh
touch /test
Its permissions are
-rwxr-xr-x 1 root root 22 Feb 24 09:34 /etc/init.d/te1
And it has this links
/etc/rc0.d/K01te1 -> ../init.d/te1
/etc/rc6.d/K01te1 -> ../init.d/te1
It is working at start up if I have a this link
/etc/rc5.d/S01te1 -> ../init.d/te1
But I need it running at shut down.
How can I do this on Debian 8 and 9 testing?
The suggestion touch /var/lock/subsys/te1
didn't work.
@reboot
?