I want to run one shell script while loading my linux server with redhat.
Below are the steps that I followed to achieve this.
1) I created script / home / user / script / test.sh
echo "xyz" >> output
2) I made a script file as an executable using the following command
chmod +x /home/user/script/test.sh
3) I created a file test.shin the directory/etc/init.d
4) I made a soft link to use below command
ls -s /etc/init.d/test.sh /etc/rc.d/S15test.sh
5) restart the server
Other things I tried are placed below the line inside the /etc/rc.localfile
/bin/sh /home/user/script/test.sh
But still I can not execute the code written inside the file test.sh.
source
share