1) copy your startup script to the/etc/init. d directory and assume that your script file name is test. 2) set the permission for the script file $ sudochmod755/etc/init. d/test3) run the following command to put the script into the Startup Script: $ cd/etc/init. d $ sudoupdate-rc.dtest & n
1) copy your startup script to the/etc/init. d directory. Assume that the file name of your script is test.
2) set the permission for the script file $ Sudo chmod 755/etc/init. d/test
3) execute the following command to put the script into the startup script: $ Cd/etc/init. d $ Sudo update-rc.d test defaults 95 Note: The number 95 indicates the sequence number started by the script. You can modify the sequence number as needed. When you have multiple startup scripts and dependencies between them are successively started, you will know the specific functions of this number. The output information of this command is as follows:
update-rc.d: warning: /etc/init.d/test missing LSB information
update-rc.d: see
Adding system startup for /etc/init.d/test ...
/etc/rc0.d/K95test -> ../init.d/test
/etc/rc1.d/K95test -> ../init.d/test
/etc/rc6.d/K95test -> ../init.d/test
/etc/rc2.d/S95test -> ../init.d/test
/etc/rc3.d/S95test -> ../init.d/test
/etc/rc4.d/S95test -> ../init.d/test
/etc/rc5.d/S95test -> ../init.d/test
How to uninstall the startup script: $ Cd/etc/init. d $ Sudo update-rc.d-f test remove command output information is as follows:
Removing any system startup links for /etc/init.d/test ...
/etc/rc0.d/K95test
/etc/rc1.d/K95test
/etc/rc2.d/S95test
/etc/rc3.d/S95test
/etc/rc4.d/S95test
/etc/rc5.d/S95test
/etc/rc6.d/K95test