dirkg
committed
on 20 Oct 06
also do not overwrite aolserver config
openacs-dist/.../debian/DEBIAN/postinst (+1 -9)
5 5 # make sure nsd is really gone
6 6 pkill nsd  
7 7
8 8 echo "Remove the dummy files from debian's stock aolserver installation"
9 9 rm -rf /var/www/index.html /var/www/icons
10 10
11 11 echo "Create the www-data user in Postgres and the dotlrn database."
12 12 su - postgres "dropuser www-data"
13 13 su - postgres "dropdb dotlrn"
14 14 su - postgres "createuser -a -d www-data"
15 15 su - postgres "createdb -E UNICODE dotlrn"
16 16 su - postgres "createlang plpgsql dotlrn"
17 17
18 18 echo "Adding vacummdb analyze jobs for dotlrn database to postgres' crontab"
19 19 su - postgres "crontab -l > /tmp/pgcrontab.$$; \
20 20 echo @hourly /usr/local/pgsql/bin/vacuumdb --analyze dotlrn >>/tmp/pgcrontab.$$; \
21 21 echo @daily /usr/local/pgsql/bin/vacuumdb --full --analyze dotlrn  >>/tmp/pgcrontab.$$; \
22 22 crontab /tmp/pgcrontab.$$; \
23 23 rm /tmp/pgcrontab.$$;"
24 24  
25   echo "Saving default aolserver and postgresql config in /usr/share/doc/dotlrn/default-etc."
26   cp -p /etc/init.d/aolserver4 /usr/share/doc/dotlrn/default-etc/init.d/
27   cp -p /etc/aolserver4/aolserver4.tcl /usr/share/doc/dotlrn/default-etc/aolserver4/
28  
29   echo "Overriding default aolserver and postgresql config."
30   cp -p /usr/share/doc/dotlrn/etc/init.d/aolserver4 /etc/init.d/
31   cp -p /usr/share/doc/dotlrn/etc/aolserver4/aolserver4.tcl /etc/aolserver4/
32  
33 25 echo "Restarting postgresql"
34 26 /etc/init.d/postgresql restart
35 27
36 28 echo "Restarting aolserver"
37   /etc/init.d/aolserver4 restart
  29 /etc/init.d/dotlrn restart