1 | 2 | simandl | #!/bin/bash |
2 | | | |
3 | | | set -e |
4 | | | |
5 | | | case "$1" in |
6 | | | |
7 | | | configure) |
8 | | | # Apache |
9 | | | a2dissite default |
10 | | | a2ensite freenet-router |
11 | | | a2ensite freenet-router-ssl |
12 | | | mkdir -p /var/log/apache2 |
13 | | | chown root:adm /var/log/apache2 |
14 | | | chmod 750 /var/log/apache2 |
15 | | | a2enmod ssl |
16 | | | a2enmod rewrite |
17 | | | a2enmod actions |
18 | | | a2enmod alias |
19 | | | a2enmod fastcgi |
20 | | | service apache2 restart |
21 | | | service php5-fpm restart |
22 | | | |
23 | | | # Usefull commands |
24 | | | |
25 | | | if [ ! -f /usr/local/sbin/rw ]; |
26 | | | then |
27 | | | ln -s /usr/local/sbin/remountrw /usr/local/sbin/rw |
28 | | | fi |
29 | | | if [ ! -f /usr/local/sbin/ro ]; |
30 | | | then |
31 | | | ln -s /usr/local/sbin/remountro /usr/local/sbin/ro |
32 | | | fi |
33 | | | |
34 | | | # Necesary folders in tmpfs |
35 | | | |
36 | | | # SSH |
37 | | | touch /var/log/lastlog |
38 | | | chgrp utmp /var/log/lastlog |
39 | | | chmod 664 /var/log/lastlog |
40 | | | |
41 | | | # safe user |
42 | | | adduser --quiet --disabled-password --gecos "" safe |
43 | | | |
44 | | | # locales |
45 | | | export LC_ALL=en_US.UTF-8 |
46 | | | export LANGUAGE=en_US |
47 | | | locale-gen en_US.UTF-8 |
48 | | | ;; |
49 | | | |
50 | | | *) |
51 | | | echo "postinst called with unknown argument \`\$1'" >&2 |
52 | | | ;; |
53 | | | |
54 | | | esac |
55 | | | |
56 | | | exit 0 |
57 | | | |