Friday, September 11, 2009

Linux Cool Tips #1

To execute a series of commands during linux start up, you can modify /etc/rc.local file for Debian-based distros or /etc/rc.d/boot.local/ for Red Hat-based and add your desired commands. Hope it helps!

Sample /etc/rc.local script in CentOS, running svnserve (daemon mode) at bootup

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.


touch /var/lock/subsys/local
/usr/bin/svnserve -d

2 comments:

  1. The svnserve program is a lightweight, standalone server for subversion. Basically, the command above is for turning on the server automatically at boot :)

    ReplyDelete

JS-Kit Comments