From: x2000habouzit Date: Fri, 5 Nov 2004 15:48:36 +0000 (+0000) Subject: upgrade scripts X-Git-Tag: xorg/old~1048 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=668dca227b51310f0009c6d70dd2558388b734f3;p=platal.git upgrade scripts --- diff --git a/scripts/migration/0.9.2/update.sh b/scripts/migration/0.9.2/update.sh new file mode 100755 index 0000000..60b62a0 --- /dev/null +++ b/scripts/migration/0.9.2/update.sh @@ -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 index 0000000..802315d --- /dev/null +++ b/scripts/migration/inc/pervasive.sh @@ -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 . +} +