Step 1 – Create your script.
Simply create a new file (I called mine svnserve) and type the command you’d like to run
Step 2 – Save the script in the /etc/init.d/ folder
Step 3 – Make the script executable
Step 4 – Add the script to the boot sequence
That’s it. When you’re done you should see some output similar to
Simply create a new file (I called mine svnserve) and type the command you’d like to run
cd /etc/init.d/ # (thanks Alfonso)
sudo touch svnserve
sudo vi svnserve
svnserve -d -r /usr/local/svn/repository_name
Step 2 – Save the script in the /etc/init.d/ folder
Step 3 – Make the script executable
sudo chmod +x svnserve
Step 4 – Add the script to the boot sequence
sudo update-rc.d svnserve defaults
That’s it. When you’re done you should see some output similar to
Adding system startup for /etc/init.d/svnserve ...
/etc/rc0.d/K20svnserve -> ../init.d/svnserve
/etc/rc1.d/K20svnserve -> ../init.d/svnserve
/etc/rc6.d/K20svnserve -> ../init.d/svnserve
/etc/rc2.d/S20svnserve -> ../init.d/svnserve
/etc/rc3.d/S20svnserve -> ../init.d/svnserve
/etc/rc4.d/S20svnserve -> ../init.d/svnserve
/etc/rc5.d/S20svnserve -> ../init.d/svnserve
Aucun commentaire:
Enregistrer un commentaire