From: x2000habouzit Date: Fri, 22 Oct 2004 11:31:41 +0000 (+0000) Subject: update script X-Git-Tag: xorg/old~1210 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=3231e3220cc723505e0e4fb922e7c3589f0f5dee;p=platal.git update script --- diff --git a/scripts/migration/0.9.1/update.sh b/scripts/migration/0.9.1/update.sh new file mode 100755 index 0000000..eecc9bf --- /dev/null +++ b/scripts/migration/0.9.1/update.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +set -e + +if [ "$UID" != 0 ]; then + echo "has to be run as root" + exit 1 +fi + + + +########################################################### +echo -n "stops mailman" +/etc/init.d/mailman stop &>/dev/null +echo . + +echo -n "now updates mailman to use new Bogofilter policy" +./mailman_update.py | grep "ERROR" || echo . + +echo -n "copies new mails templates" +cp -f ../../mailman/mails/*.txt /etc/mailman/fr/ +echo . + +echo -n "starts mailman" +/etc/init.d/mailman start &>/dev/null +echo . + +########################################################### +echo -n "now drop x4dat.emploi_naf" +echo 'drop table x4dat.emploi_naf;' | mysql -u root x4dat &>/dev/null +echo . + +########################################################### +echo -n "updating newsletter table" +mysql -u root x4dat < newsleter.sql &>/dev/null +echo '.' + +########################################################### +echo ""