0e15c349dc8a671428c92d3857484a84cfc085c2
[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 declare -r DATABASE="${DBPREFIX}x4dat"
17
18 function die() {
19 echo $1
20 exit 1
21 }
22
23 function mailman_stop() {
24 echo -n "stops mailman"
25 /etc/init.d/mailman stop &>/dev/null
26 echo .
27 }
28
29 function mailman_templates() {
30 echo -n "copies new mails templates"
31 mkdir -p /etc/mailman/xorg
32 cp -f ../../modules/lists/mail_templates/*.txt /etc/mailman/xorg
33 echo .
34 }
35
36 function mailman_start() {
37 echo -n "starts mailman"
38 /etc/init.d/mailman start &>/dev/null
39 echo .
40 }