How to LSBize and init Script in Debian
Posted By BlogAdmin on March 3rd, 2014
Assalamu’alaykum warahmatullahi wabarakatuh,
When we want to add a script that run automatically at system start up, we need to add the script to rc.d at local machine with this command :
1 |
update-rc.d local defaults |
where local is your own script that located in /etc/init.d
if you just type in your script DebianOS makes you to have an LSB Script, how to make a LSB Script ?
It was easy, just put this commands in your script,
1 |
### BEGIN INIT INFO |
2 |
# Provides: scriptname |
3 |
# Required-Start: $remote_fs $syslog |
4 |
# Required-Stop: $remote_fs $syslog |
5 |
# Default-Start: 2 3 4 5 |
6 |
# Default-Stop: 0 1 6 |
7 |
# Short-Description: Start daemon at boot time |
8 |
# Description: Enable service provided by daemon. |
9 |
### END INIT INFO |
So Debian will accept your script and add it into your machine init script that run in your desire run level.
Happy Administer System !
Similar Posts
Share
- How to Reset the MySQL Root Password on Unix Systems
- Just a Note : Reconfigure Exim4 MTA in Debian
- How to List MySQL Users
Posted in Online Note for System Administrator
Comments 0