![]() □ Was this helpful? Please add a comment to show your appreciation or feedback. Join the nixCraft community via RSS Feed or Email Newsletter. He wrote more than 7k+ posts and helped numerous readers to master IT topics. Vivek Gite is the founder of nixCraft, the oldest running blog about Linux and open source. Open the file mystartup.sh in /etc/init.d/ directoryĪppend your script path to the end as follows (suppose your script is /root/fw.start – script that starts firewall)įor more info on ‘Customizing your installation of Debian GNU/Linux’ visit Offical Debian DOC/FAQ (B) Execute shell script at system startup 3 Vagrant will rename the machine in Virtualbox to the name specified in the log. Within this VM, I have some bash/shell scripts and also defined few global variables like export abc123. 2 After download is finished, it will import the image into Virtualbox. I have a VM running in Oracle Virtual box. You can add more commands to this file or even call other shell/perl scripts from this file too. 1 At first Vagrant looks for a base box (ubuntu/trusty64), once it doesn’t find it, it will download it from (unless configured otherwise). Next time you reboot the system, you custom command or script will get executed via mystartup.sh. Just run the command ls –l /etc/rc3.d/ and you will see all script soft linked to /etc/init.d with numbers. Iv)Make sure this script get executed every time Debian Linux system boot up/comes up:ĭefaults : The argument ‘defaults’ refers to the default runlevels, which are 2 through 5.ġ00 : Number 100 means script will get executed before any script containing number 101. Iii) Setup executable permission on script: Ii) Add commands to this script one by one:Įcho “Setting up customized environment…” I) Create a script called mystartup.sh in /etc/init.d/ directory(login as root) Let us assume you would like to run command called
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |