aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-09-13 12:33:57 +0200
committerAndreas Schneider <mail@cynapses.org>2009-09-13 12:33:57 +0200
commitcd1109f1461b324d447769aaf28e0b87e71b0152 (patch)
tree217693213c95d657c77ce61623a46e1215bdb901
parentbb418f3b891eec13d20f68c5b08e5072283a1950 (diff)
downloadmlmmj-webarchiver-cd1109f1461b324d447769aaf28e0b87e71b0152.tar.gz
mlmmj-webarchiver-cd1109f1461b324d447769aaf28e0b87e71b0152.tar.xz
mlmmj-webarchiver-cd1109f1461b324d447769aaf28e0b87e71b0152.zip
Improved config file and added more description.
-rwxr-xr-xmlmmj-webarchiver.sh14
-rw-r--r--mlmmj-webarchiver/mlmmj-webarchiver.conf21
2 files changed, 23 insertions, 12 deletions
diff --git a/mlmmj-webarchiver.sh b/mlmmj-webarchiver.sh
index 44dd562..d405e78 100755
--- a/mlmmj-webarchiver.sh
+++ b/mlmmj-webarchiver.sh
@@ -24,7 +24,7 @@ if test -r /var/run/mlmmj-webarchiver.pid; then
MPID=$(< /var/run/mlmmj-webarchiver.pid)
echo "PID: $MPID"
if $(kill -CHLD $MPID >/dev/null 2>&1); then
- test "$VERBOSE" && echo "mlmml-webarchiver is already running."
+ test "x${VERBOSE}" = "xyes" && echo "mlmml-webarchiver is already running."
exit 0
fi
fi
@@ -92,13 +92,13 @@ for wlist in $WEBARCHIVED_LISTS; do
WEBARCHIVE_OUT=${WEBARCHIVE_TMP}
fi
- test $VERBOSE && echo "+ working on $wlist..."
+ test "x${VERBOSE}" = "xyes" && echo "+ working on $wlist..."
# first we need to get the current index, and if no index
# exist, skip this list
if [ -r "${MLMMJ_LISTDIR}/${wlist}/index" ]; then
CURINDEX=$(cat ${MLMMJ_LISTDIR}/${wlist}/index)
else
- test $VERBOSE && echo "- skipping $wlist - no mails yet."
+ test "x${VERBOSE}" = "xyes" && echo "- skipping $wlist - no mails yet."
continue;
fi
@@ -108,7 +108,7 @@ for wlist in $WEBARCHIVED_LISTS; do
# skip the list if we're already up2date
if [ "$CURINDEX" = "$LASTINDEX" ] && [ "$LASTINDEX" != "1" ]; then
- test $VERBOSE && echo "- skipping $wlist - already up2date."
+ test "x${VERBOSE}" = "xyes" && echo "- skipping $wlist - already up2date."
continue;
fi
@@ -137,7 +137,7 @@ for wlist in $WEBARCHIVED_LISTS; do
# this is currently only "useable/usefull" for apache and compatible servers.
# maybe we need a more general way for generating this stuff? FIXME
if [ -f "${MLMMJ_LISTDIR}/${wlist}/control/webarchiveprotected" ]; then
- test $VERBOSE && echo "+ protecting webarchive of $wlist."
+ test "x${VERBOSE}" = "xyes" && echo "+ protecting webarchive of $wlist."
echo "AuthType $AUTHTYPE" > "${WEBARCHIVE_OUT}/${wlist}/.htaccess"
echo "AuthName \"${wlist} archives\"" >> "${WEBARCHIVE_OUT}/${wlist}/.htaccess"
echo "AuthUserFile ${MLMMJ_LISTDIR}/${wlist}/control/webarchiveprotected" >> "${WEBARCHIVE_OUT}/${wlist}/.htaccess"
@@ -146,7 +146,7 @@ for wlist in $WEBARCHIVED_LISTS; do
else
# and need to remove it, if no more protection is wanted.
if [ -f "${WEBARCHIVE_OUT}/${wlist}/.htaccess" ]; then
- test $VERBOSE && echo "+ remove protection from webarchive of $wlist."
+ test "x${VERBOSE}" = "xyes" && echo "+ remove protection from webarchive of $wlist."
rm "${WEBARCHIVE_OUT}/${wlist}/.htaccess"
fi
fi
@@ -193,7 +193,7 @@ for wlist in $WEBARCHIVED_LISTS; do
THISMONTH=$(getmailmonth "${MLMMJ_LISTDIR}/${wlist}/archive/${listmail}")
if [ "$THISMONTH" != "$LASTMONTH" ]; then
- test $VERBOSE && echo "+ creating $THISMONTH for $wlist"
+ test "x${VERBOSE}" = "xyes" && echo "+ creating $THISMONTH for $wlist"
LASTMONTH=$THISMONTH
fi
diff --git a/mlmmj-webarchiver/mlmmj-webarchiver.conf b/mlmmj-webarchiver/mlmmj-webarchiver.conf
index 922d129..3cb5424 100644
--- a/mlmmj-webarchiver/mlmmj-webarchiver.conf
+++ b/mlmmj-webarchiver/mlmmj-webarchiver.conf
@@ -1,39 +1,50 @@
-# Webarchiver Config
+###
+### mlmmj-webarchiver config file
+###
# mlmmj list dir (normally /var/spool/mlmmj)
+# type: path
MLMMJ_LISTDIR="/var/spool/mlmmj"
-#MLMMJ_LISTDIR="/var/spool/mlmmj/csync-devel"
# weboutput dir
+# type: path
WEBARCHIVE_OUT="/srv/www/htdocs/archive"
# more output (normally just errors, disable if you want to run as cron)
-VERBOSE="1"
+# type: yes/no
+VERBOSE="yes"
# default hypermail.rc file (will be used if no file exist for
# the list itself)
+# type: file
RCFILE="/etc/mlmmj-webarchiver/mhonarc.rc"
-# which permissions should be set for our archive dirs (file permissions
-# should be set with hypermail config!)
+# which permissions should be set for our archive dirs
+# type: integer
DIRMODES="755"
# skeleton directory copied into new archive main dir
+# type: path
SKEL="/etc/mlmmj-webarchiver/skel"
# index file copied into new lists dir
+# type: file
NEW_LIST_INDEX="/etc/mlmmj-webarchiver/index.php.newlist"
# create archive as maildir zip?
+# type: yes/no
ZIP_ARCHIVE="no"
# if you want a link to your archive, you can insert it here
+# type: string
MORE_LISTS_URL=""
# here you can put stuff added to hypermail command for every mail (you
# may not need it, but its here ;)
+# type: string
MHONARC_CMDS=""
# Which AuthType for htaccess protected archives?
+# type: string
AUTHTYPE="Basic"