From: Florent Bruneau Date: Sun, 1 Jun 2008 15:07:12 +0000 (+0200) Subject: Script to create a blog. X-Git-Url: http://git.polytechnique.org/?p=dotclear.git;a=commitdiff_plain;h=0873522c26fc07b4b19a6e43a30188545ecb44a6 Script to create a blog. Signed-off-by: Florent Bruneau --- diff --git a/createBlog.sh b/createBlog.sh new file mode 100755 index 0000000..13af937 --- /dev/null +++ b/createBlog.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +type=$1 +owner=$2 +url=$3 +apache_group=www-data +rootpath=/home/x2003bruneau/public_html/ +templatepath=dotclear +baseurl=/~x2003bruneau +serviceurl="http://murphy.m4x.org/~x2003bruneau/dotclear2/xorgservice/createBlog" + +die() { + echo $1 + exit 1 +} + +( wget "$serviceurl?owner=$owner&type=$type&url=$3" -O - 2> /dev/null | grep 'blog created' ) || die "Blog creating failed" + +( cd $rootpath && mkdir $owner ) || die "Can't create the repository for the blog" + +cd $owner +for i in admin db inc index.php locales plugins themes ; do + ln -s $rootpath/$templatepath/$i || die "Can't add path to $i" +done +mkdir public && chmod a+rwx public + +( cat < .htaccess