Skip to content

Instantly share code, notes, and snippets.

@7hunderbird
Created January 5, 2010 19:47
Show Gist options
  • Save 7hunderbird/269642 to your computer and use it in GitHub Desktop.
Save 7hunderbird/269642 to your computer and use it in GitHub Desktop.
#!/bin/bash
# path of MoinMoin shared files
SHARE=/usr/local/share/moin
# path to target instance location
INSTANCE=$1
# should be nice
USER=nginx
GROUP=nginx
if [ ! $1 ]
then
echo "You must specify an instance (relative or absolute path)"
exit
fi
if [[ -e $1 || -d $1 ]]
then
echo "$1 already exists"
exit
fi
mkdir -p $INSTANCE
cp -R $SHARE/data $INSTANCE
cp -R $SHARE/underlay $INSTANCE
cp $SHARE/config/wikiconfig.py $INSTANCE
chown -R $USER.$GROUP $INSTANCE
chmod -R ug+rwX $INSTANCE
chmod -R o-rwx $INSTANCE
if [ $? ]
then
echo "Done."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment