From 20afe88965b30d2652f57e02c5dec75b61e7c036 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 25 Jan 2010 22:20:36 -0200 Subject: Renaming template --- manifests/init.pp | 4 ++-- templates/refresh.sh.erb | 29 +++++++++++++++++++++++++++++ templates/update.sh.erb | 29 ----------------------------- 3 files changed, 31 insertions(+), 31 deletions(-) create mode 100644 templates/refresh.sh.erb delete mode 100644 templates/update.sh.erb diff --git a/manifests/init.pp b/manifests/init.pp index 0896dbf..a61c4a4 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -55,8 +55,8 @@ class ikiwiki { } exec { "/usr/local/sbin/ikiwiki-deploy $name $instance": - unless => "/bin/sh -c '[ -f ${apache_sites_folder}/${name}/${instance}_src/index.mdwn ]'", - user => root, + unless => "/bin/sh -c '[ -f ${apache_sites_folder}/${name}/${instance}_src/index.mdwn ]'", + user => root, } if !defined(File["${apache_sites_folder}/${name}/${instance}_src"]) { diff --git a/templates/refresh.sh.erb b/templates/refresh.sh.erb new file mode 100644 index 0000000..e158f58 --- /dev/null +++ b/templates/refresh.sh.erb @@ -0,0 +1,29 @@ +#!/bin/bash + +NAME="$1" +INSTANCE="$2" +BASE="<%= apache_sites_folder %>" +SITE=$BASE/$NAME +CONF="/etc/ikiwiki" +WEB_OWNER="www-data" +WEB_GROUP="www-data" +REPO_OWNER="gitosis" +REPO_GROUP="gitosis" +REPO="/var/git/repositories/$NAME.git" + +if [ -z "$INSTANCE" ]; then + echo "Usage:`basename $0` " +fi + +if [ ! -e "$CONF/$NAME" ]; then + echo "No config file for $NAME" +fi + +# Setup +ikiwiki --setup /etc/ikiwiki/$NAME.setup + +# Fix permissions +chown -R $WEB_OWNER.$WEB_GROUP $SITE/"$INSTANCE"_src $SITE/$INSTANCE +chown -R $REPO_OWNER.$REPO_GROUP $REPO +chown $WEB_OWNER.$REPO_GROUP $REPO/hooks/post-update +chown $WEB_OWNER.$REPO_GROUP $SITE/$INSTANCE/ikiwiki.cgi diff --git a/templates/update.sh.erb b/templates/update.sh.erb deleted file mode 100644 index e158f58..0000000 --- a/templates/update.sh.erb +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -NAME="$1" -INSTANCE="$2" -BASE="<%= apache_sites_folder %>" -SITE=$BASE/$NAME -CONF="/etc/ikiwiki" -WEB_OWNER="www-data" -WEB_GROUP="www-data" -REPO_OWNER="gitosis" -REPO_GROUP="gitosis" -REPO="/var/git/repositories/$NAME.git" - -if [ -z "$INSTANCE" ]; then - echo "Usage:`basename $0` " -fi - -if [ ! -e "$CONF/$NAME" ]; then - echo "No config file for $NAME" -fi - -# Setup -ikiwiki --setup /etc/ikiwiki/$NAME.setup - -# Fix permissions -chown -R $WEB_OWNER.$WEB_GROUP $SITE/"$INSTANCE"_src $SITE/$INSTANCE -chown -R $REPO_OWNER.$REPO_GROUP $REPO -chown $WEB_OWNER.$REPO_GROUP $REPO/hooks/post-update -chown $WEB_OWNER.$REPO_GROUP $SITE/$INSTANCE/ikiwiki.cgi -- cgit v1.2.3