Hello,
I need to execute a script during shutdown. The script is below:
root@hosto:/etc/init.d# cat whatstop
#!/bin/sh /etc/rc.common
STOP=10
stop() {
touch /tmp/stopped.txt
}
shutdown(){
touch /tmp/shut.txt
}
I have created the link: /etc/rc.d/K10whatstop
-> /etc/init.d/whatstop
by executing the command: /etc/init.d/whatstop enable
The script works when ran manually (/etc/init.d/whatstop stop
) or (/etc/init.d/whatstop shutdown
). However, it doesn't work when reboot.
Any help is appreciated.