ubuntu Add boot boot execute script
method One: Edit the Rc.loacl script
Ubuntu will execute the script in the/etc/rc.local file after boot,
So we can add the startup script directly to the/etc/rc.local.
Of course to add to the statement: Exit 0 before the line.
Such as:
sudo vi/etc/rc.local
Then, add the scripting code before exit 0. method Two: Add an Ubuntu boot-up service
First copy or soft connect the script to the/etc/init.d/directory, assuming I create a start-zk.sh file in the current directory for the boot zookeeper. Note Start with #!/bin/bash:
Grant file start-zk.sh file executable permissions
CHOMD +x start-zk.sh
Execute the command to add the script to the queue in which the execution was initialized:
UPDATE-RC.D start-zk.sh Defaults
Ways to uninstall Startup scripts
CD/ETC/INIT.D
sudo update-rc.d-f start-zk.sh remove
UPDATE-RC.D Command Reference: http://blog.csdn.net/shb_derek1/article/details/8489112