Created
January 5, 2010 19:47
-
-
Save 7hunderbird/269642 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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