update script
authorx2000habouzit <x2000habouzit>
Fri, 22 Oct 2004 11:31:41 +0000 (11:31 +0000)
committerx2000habouzit <x2000habouzit>
Fri, 22 Oct 2004 11:31:41 +0000 (11:31 +0000)
scripts/migration/0.9.1/update.sh [new file with mode: 0755]

diff --git a/scripts/migration/0.9.1/update.sh b/scripts/migration/0.9.1/update.sh
new file mode 100755 (executable)
index 0000000..eecc9bf
--- /dev/null
@@ -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 ""