BackupPC-users

Re: [BackupPC-users] OT: (e.g.) sed command to modify configuration file

2009-09-28 17:03:42
Subject: Re: [BackupPC-users] OT: (e.g.) sed command to modify configuration file
From: Chris Robertson <crobertson AT gci DOT net>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Mon, 28 Sep 2009 12:58:58 -0800
Timothy J Massey wrote:
> Hello!
>
> I have a shell script that I use to install BackupPC.  It takes a standard 
> CentOS installation and performs the configuration that I would normally 
> do to install BackupPC.  There are probably way better ways of doing this, 
> but this is the way I've chosen.
>
> As part of this script, I use sed to modify certain configuration files. 

Why modify, when you can replace?


cat > /etc/ssh/sshd_config << EOF
# This is my sshd_config.
# There are many like it, but this one is mine...
Protocol 2
PermitRootLogin no
EOF


Be aware, this is not a complete list of options.  egrep -v "(^#|^$)" 
/etc/ssh/sshd_config (before you run the above cat!) is more likely to be.

Chris


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/