Sponsored Content
Top Forums Web Development bash script editing my apache config files Post 302330321 by glen.barber on Tuesday 30th of June 2009 09:37:24 PM
Old 06-30-2009
This doesn't answer your 'My Solution' question, but I do something similar on a development machine. I use subversion to checkout from my code repository into /home/me/svn/site and create a symbolic link for apache to this location:
Code:
rm -rf /var/www && ln -s /var/www /home/me/svn/site

I know it doesn't answer your real question, but maybe this solution is easier. *shrug*
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Apache Config Files

Currently our Apache log files are huge, I want to put say a month's time limit on this, then when it hits the end of the month I would like it to start over writing. Does anyone know where the config file is for this and what its called? I also want to do exactly the same on wtmp config (who... (1 Reply)
Discussion started by: Webwitch
1 Replies

2. Shell Programming and Scripting

Editing lists of integers in 1d files with bash shell

Hi, I need a script that will: 1. Go through about 20 different folders, each containing about 20 1d files. The 1d files go something like this: 22.253 37.707 78.117 112.374 127.944 156.067 180.956 233.785 249.256 ... (1 Reply)
Discussion started by: ac130pilot
1 Replies

3. Shell Programming and Scripting

Shell script that will compare two config files and produce 2 outputs 1)actual config file 2)report

Hi I am new to shell scripting. There is a requirement to write a shell script to meet follwing needs.Prompt reply shall be highly appreciated. script that will compare two config files and produce 2 outputs - actual config file and a report indicating changes made. OS :Susi linux ver 10.3. ... (4 Replies)
Discussion started by: muraliinfy04
4 Replies

4. Shell Programming and Scripting

Problems editing file with awk in bash script

Hello dear users, here I have a script to manipulate .csv files that are like this originally: And I need to make a script to delete certain fields. Each field is separated with a comma. So, here is my script (at least a part of it): Field $1 is composed of a name, and then a... (5 Replies)
Discussion started by: sr00t
5 Replies

5. Shell Programming and Scripting

bash script config file

hi all config.sh : dhcp="0" setip="1" telnet="1" ping="1" main.sh function dhcp { } function setip { } (1 Reply)
Discussion started by: sadosan83
1 Replies

6. Red Hat

Apache virtual host config vs global config problem

Hi folks, I am trying to configure Apache webserver and also a virtual host inside this webserver. For Global server config: /var/www/html/index.html For virtual host config: /var/www/virtual/index.html Both client10 & www10 are pointing to 192.168.122.10 IP address. BUT, MY... (1 Reply)
Discussion started by: freebird8z
1 Replies

7. Shell Programming and Scripting

Bash script to copy apache log files to client directory

Our Apache log files are written to a location on the server that we as clients have no access. Don't ask. Every month, I have to e-mail the administrator to have him manually copy our Apache log files to a directory in our file space. You can probably guess how efficient it is to do things this... (3 Replies)
Discussion started by: gregraven
3 Replies

8. Shell Programming and Scripting

Bash script deleting my files, and editing files in subdirectories question

#!/bin/bash # name=$1 type=$2 number=1 for file in ./** do if then filenumber=00$number elif then filenumber=0$number fi tempname="$name""$filenumber"."$type" if (4 Replies)
Discussion started by: TheGreatGizmo
4 Replies

9. Shell Programming and Scripting

Parsing and Editing a json file with bash script

I am trying to automate editing of a json file using bash script. The file I initially receive is { "appMap": { "URL1": { "name": "a" }, "URL2": { "name": "b" }, "URL3": { "name": "c" }, } WHat I would like to do is replace... (5 Replies)
Discussion started by: Junaid Subhani
5 Replies

10. UNIX for Beginners Questions & Answers

Pass config file to bash script

I just want to make sure I am understanding how to pass a config file to a bash script . In the below I pass to arguments to a script, then define them in the script as id and config. I then source config using ., if I understand correctly the variables in the config file can now be used by the... (11 Replies)
Discussion started by: cmccabe
11 Replies
SVNPATH(1)																SVNPATH(1)

NAME
svnpath - output svn url with support for tags and branches SYNOPSIS
svnpath svnpath tags svnpath branches svnpath trunk DESCRIPTION
svnpath is intended to be run in a Subversion working copy. In its simplest usage, svnpath with no parameters outputs the svn url for the repository associated with the working copy. If a parameter is given, svnpath attempts to instead output the url that would be used for the tags, branches, or trunk. This will only work if it's run in the top-level directory that is subject to tagging or branching. For example, if you want to tag what's checked into Subversion as version 1.0, you could use a command like this: svn cp $(svnpath) $(svnpath tags)/1.0 That's much easier than using svn info to look up the repository url and manually modifying it to derive the url to use for the tag, and typing in something like this: svn cp svn+ssh://my.server.example/svn/project/trunk svn+ssh://my.server.example/svn/project/tags/1.0 svnpath uses a simple heuristic to convert between the trunk, tags, and branches paths. It replaces the first occurrence of trunk, tags, or branches with the name of what you're looking for. This will work ok for most typical Subversion repository layouts. If you have an atypical layout and it does not work, you can add a ~/.svnpath file. This file is perl code, which can modify the path in $url. For example, the author uses this file: #!/usr/bin/perl # svnpath personal override file # For d-i I sometimes work from a full d-i tree branch. Remove that from # the path to get regular tags or branches directories. $url=~s!d-i/(rc|beta)[0-9]+/!!; $url=~s!d-i/sarge/!!; 1 LICENSE
GPL version 2 or later AUTHOR
Joey Hess <joey@kitenet.net> Debian Utilities 2013-12-23 SVNPATH(1)
All times are GMT -4. The time now is 02:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy