0 comments
general
05 Nov 2009

Useful Bash Shell Scripts

Bash is a type of shell; you will find it sitting on almost every nix based computer you can get your hands on. To check if your running bash type in this on your command prompt

echo $SHELL

If it returns something like

/bin/bash

Then you are. There are alternatives to bash; C Shell (csh) and Bourne Shell (sh) being popular ones.

Anyway, getting to the point …

Scripting

I wrote some bash scripts to help with setting up websites; I know the current trend is to use Capistrano but not everyone wants to install all of it’s dependancies.

Currently, there is one main script called sitecreate.sh, this takes in an bunch of arguments and then goes off and calls utility scripts in the same directory. As long as you get the command right, the following happens:

user.sh

vhost.sh

mysql.sh

checkout.sh

Once all of those are done, it then restarts apache. The scripts aren’t fully tested yet, but feel free to grab them over at github

blog comments powered by Disqus