fixed scripts
authorLisa Marie Maginnis <lisam@fsf.org>
Mon, 26 Jan 2015 16:20:13 +0000 (11:20 -0500)
committerLisa Marie Maginnis <lisam@fsf.org>
Mon, 26 Jan 2015 16:20:13 +0000 (11:20 -0500)
scripts/IKIWIKI/10-ikiwiki.sh [new file with mode: 0644]
scripts/IKIWIKI/20-setup-ikiwiki.sh [new file with mode: 0644]

diff --git a/scripts/IKIWIKI/10-ikiwiki.sh b/scripts/IKIWIKI/10-ikiwiki.sh
new file mode 100644 (file)
index 0000000..2ddfea1
--- /dev/null
@@ -0,0 +1,7 @@
+#! /bin/bash
+
+# add a ikiwiki user account
+if ! $ROOTCMD getent passwd ikiwki ; then
+    $ROOTCMD adduser --system --ingroup www-data --disabled-password --gecos "ikiwiki user" ikiwiki
+
+fi
diff --git a/scripts/IKIWIKI/20-setup-ikiwiki.sh b/scripts/IKIWIKI/20-setup-ikiwiki.sh
new file mode 100644 (file)
index 0000000..4465993
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# Detect if ikikwiki is already installed
+if [ ! -e /etc/ikiwiki/ikiwiki.setup ]; then
+ # copy ikiwiki config
+ fcopy -v /etc/ikiwiki/ikiwiki.setup
+
+ # run setup
+ $ROOTCMD ikiwiki --setup /etc/ikiwiki/auto.setup/DEFAULT
+fi