ede0942f64278dfdf46868515742b73534150476
[platal.git] / upgrade / inc / pervasive.sh
1 #!/bin/bash
2
3 MYSQL='mysql -u admin '
4
5
6 set -e
7
8 #if [ "$UID" != 0 ]; then
9 # echo "has to be run as root"
10 # exit 1
11 #fi
12
13 if [[ -n "${DBPREFIX}" ]]; then
14 echo "Using non-default database ${DBPREFIX}x4dat."
15 fi
16 if [[ -z "${DATABASE}" ]]; then
17 DATABASE="${DBPREFIX}x4dat"
18 fi
19
20 function die() {
21 echo $1
22 exit 1
23 }
24
25 function mailman_stop() {
26 echo -n "stops mailman"
27 /etc/init.d/mailman stop &>/dev/null
28 echo .
29 }
30
31 function mailman_templates() {
32 echo -n "copies new mails templates"
33 mkdir -p /etc/mailman/xorg
34 cp -f ../../modules/lists/mail_templates/*.txt /etc/mailman/xorg
35 echo .
36 }
37
38 function mailman_start() {
39 echo -n "starts mailman"
40 /etc/init.d/mailman start &>/dev/null
41 echo .
42 }