aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-09-28 00:27:47 -0300
committerSilvio Rhatto <rhatto@riseup.net>2011-09-28 00:27:47 -0300
commit0320e513959743a917364b39b2f49959558f0ffc (patch)
treeb85f71ee8361ca1a58c394a2ae1d0e1e9223f9ea /share
parent0110b0a68a0bd67ce6f9616de9e9fbaa603e443e (diff)
downloadhydra-0320e513959743a917364b39b2f49959558f0ffc.tar.gz
hydra-0320e513959743a917364b39b2f49959558f0ffc.tar.bz2
Support for ikiwiki on backup-restore-site
Diffstat (limited to 'share')
-rwxr-xr-xshare/hydractl/backup-restore-site15
1 files changed, 14 insertions, 1 deletions
diff --git a/share/hydractl/backup-restore-site b/share/hydractl/backup-restore-site
index dddc3c0..81de76d 100755
--- a/share/hydractl/backup-restore-site
+++ b/share/hydractl/backup-restore-site
@@ -2,7 +2,7 @@
#
# Restore a website from backup
#
-# TODO: moin, ikiwiki, etc
+# TODO: moin
# Load.
source $APP_BASE/lib/hydra/functions || exit 1
@@ -100,3 +100,16 @@ if [ -f "$RESTOREDIR/var/backups/mysql/sqldump/$SITE.sql.gz" ]; then
else
echo "Databases should be manually restored"
fi
+
+# Ikiwiki
+if [ -e "$FOLDER/ikiwiki" ]; then
+ echo "Restoring ikiwiki for $SITE..."
+ file="/etc/ikiwiki/$SITE.setup"
+ if [ -e "$file" ] && [ -e "/var/git/repositories/$SITE" ]; then
+ site="`basename $file .setup`"
+ git clone file:///var/git/repositories/$SITE /var/sites/$SITE/ikiwiki_src
+ ikiwiki --setup $file --rebuild
+ else
+ echo "Either $file or git repository not found for $SITE ikiwiki instance"
+ fi
+fi