I wrote a service script in /etc/init.d
How can I get the system is doing reboot or shutdown in the script
I need to do some different work when reboot and shutdown
How to get the system is doing reboot or shutdown?
Re: How to get the system is doing reboot or shutdown?
For CentOS 7 you probably should be using unit files not initscripts. And I doubt if there is a way since they are effectively the same thing - restart is shutdown then restart, shutdown is just shutdown.
CentOS 6 died in November 2020 - migrate to a new version!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke