upgrade scripts
authorx2000habouzit <x2000habouzit>
Fri, 5 Nov 2004 15:48:36 +0000 (15:48 +0000)
committerx2000habouzit <x2000habouzit>
Fri, 5 Nov 2004 15:48:36 +0000 (15:48 +0000)
scripts/migration/0.9.2/update.sh [new file with mode: 0755]
scripts/migration/inc/pervasive.sh [new file with mode: 0755]

diff --git a/scripts/migration/0.9.2/update.sh b/scripts/migration/0.9.2/update.sh
new file mode 100755 (executable)
index 0000000..60b62a0
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+. ../inc/pervasive.sh
+
+mailman_stop
+mailman_templates
+mailman_start
+
+
+###########################################################
+for sql in *.sql
+do
+    echo -n $sql
+    $MYSQL x4dat < $sql &>/dev/null || echo -n " ERROR"
+    echo .
+done
+
+###########################################################
+echo "STILL TODO :
+  - update the mailman-rpc daemon
+  - insert scripts/cron/watch.notifs.php in the crontab
+    suggested : 0 4 * * 6  (it means every saturday at 4 AM)
+"
diff --git a/scripts/migration/inc/pervasive.sh b/scripts/migration/inc/pervasive.sh
new file mode 100755 (executable)
index 0000000..802315d
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+MYSQL='mysql -u admin '
+
+
+set -e
+
+if [ "$UID" != 0 ]; then
+    echo "has to be run as root"
+    exit 1
+fi
+
+function mailman_stop() {
+    echo -n "stops mailman"
+    /etc/init.d/mailman stop &>/dev/null
+    echo .
+}
+
+function mailman_templates() {
+    echo -n "copies new mails templates"
+    cp -f ../../mailman/mails/*.txt /etc/mailman/fr/
+    echo .
+}
+
+function mailman_start() {
+    echo -n "starts mailman"
+    /etc/init.d/mailman start &>/dev/null
+    echo .
+}
+