From: Vincent Zanotti Date: Mon, 9 Nov 2009 00:42:47 +0000 (+0100) Subject: Adds an update script for version 0.10.2. X-Git-Tag: xorg/0.10.2~10 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=f3a7456dbe1cbe78dfe0ccc2e99c299ad97203c5;p=platal.git Adds an update script for version 0.10.2. Signed-off-by: Vincent Zanotti --- diff --git a/upgrade/0.10.2/update.sh b/upgrade/0.10.2/update.sh new file mode 100755 index 0000000..928d1e4 --- /dev/null +++ b/upgrade/0.10.2/update.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +. ../inc/pervasive.sh + +mailman_stop +mailman_templates +mailman_start + +########################################################### +for sql in *.sql +do + echo -n $sql + $MYSQL $DATABASE < $sql &>/dev/null || echo -n " ERROR" + echo . +done diff --git a/upgrade/inc/pervasive.sh b/upgrade/inc/pervasive.sh index 8b1d47f..f5b279e 100755 --- a/upgrade/inc/pervasive.sh +++ b/upgrade/inc/pervasive.sh @@ -10,6 +10,11 @@ if [ "$UID" != 0 ]; then exit 1 fi +if [[ -n "${DBPREFIX}" ]]; then + echo "Using non-default database ${DBPREFIX}x4dat." +fi +declare -r DATABASE="${DBPREFIX}x4dat" + function mailman_stop() { echo -n "stops mailman" /etc/init.d/mailman stop &>/dev/null @@ -28,4 +33,3 @@ function mailman_start() { /etc/init.d/mailman start &>/dev/null echo . } -