diff options
Diffstat (limited to '.github/prepare_debian.sh')
| -rwxr-xr-x | .github/prepare_debian.sh | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/.github/prepare_debian.sh b/.github/prepare_debian.sh index f7b6cf9f..15c2286c 100755 --- a/.github/prepare_debian.sh +++ b/.github/prepare_debian.sh | |||
| @@ -24,6 +24,7 @@ apt-get -y install perl \ | |||
| 24 | libpq-dev \ | 24 | libpq-dev \ |
| 25 | libradcli-dev \ | 25 | libradcli-dev \ |
| 26 | libnet-snmp-perl \ | 26 | libnet-snmp-perl \ |
| 27 | libsnmp-dev \ | ||
| 27 | procps \ | 28 | procps \ |
| 28 | libdbi0-dev \ | 29 | libdbi0-dev \ |
| 29 | libdbd-sqlite3 \ | 30 | libdbd-sqlite3 \ |
| @@ -66,10 +67,10 @@ apt-get -y install perl \ | |||
| 66 | libjson-perl | 67 | libjson-perl |
| 67 | 68 | ||
| 68 | # remove ipv6 interface from hosts | 69 | # remove ipv6 interface from hosts |
| 69 | sed '/^::1/d' /etc/hosts > /tmp/hosts | 70 | # sed '/^::1/d' /etc/hosts > /tmp/hosts |
| 70 | cp -f /tmp/hosts /etc/hosts | 71 | # cp -f /tmp/hosts /etc/hosts |
| 71 | ip addr show | 72 | # ip addr show |
| 72 | cat /etc/hosts | 73 | # cat /etc/hosts |
| 73 | 74 | ||
| 74 | # apache | 75 | # apache |
| 75 | a2enmod ssl | 76 | a2enmod ssl |
| @@ -79,6 +80,19 @@ a2ensite default-ssl | |||
| 79 | rm /etc/ssl/certs/ssl-cert-snakeoil.pem | 80 | rm /etc/ssl/certs/ssl-cert-snakeoil.pem |
| 80 | rm /etc/ssl/private/ssl-cert-snakeoil.key | 81 | rm /etc/ssl/private/ssl-cert-snakeoil.key |
| 81 | openssl req -nodes -newkey rsa:2048 -x509 -sha256 -days 365 -nodes -keyout /etc/ssl/private/ssl-cert-snakeoil.key -out /etc/ssl/certs/ssl-cert-snakeoil.pem -subj "/C=GB/ST=London/L=London/O=Global Security/OU=IT Department/CN=$(hostname)" | 82 | openssl req -nodes -newkey rsa:2048 -x509 -sha256 -days 365 -nodes -keyout /etc/ssl/private/ssl-cert-snakeoil.key -out /etc/ssl/certs/ssl-cert-snakeoil.pem -subj "/C=GB/ST=London/L=London/O=Global Security/OU=IT Department/CN=$(hostname)" |
| 83 | # add a subdomain for testing | ||
| 84 | cp tools/subdomain1/subdomain1.conf /etc/apache2/sites-available/ | ||
| 85 | mkdir -p /var/www/subdomain1 | ||
| 86 | cp tools/subdomain1/index.php /var/www/subdomain1/ | ||
| 87 | echo '127.0.0.1 subdomain1.localhost' >> /etc/hosts | ||
| 88 | echo '127.0.0.1 subdomain1.localhost.com' >> /etc/hosts | ||
| 89 | apache2ctl configtest | ||
| 90 | a2ensite subdomain1.conf | ||
| 91 | |||
| 92 | # Make it listen to both IPv4 on IPv6 on localhost | ||
| 93 | sed -i 's/^Listen 80/Listen 0.0.0.0:80\nListen [::1]:80/' /etc/apache2/ports.conf | ||
| 94 | sed -i 's/^[[:space:]]*Listen 443/Listen 0.0.0.0:443\nListen [::1]:443/' /etc/apache2/ports.conf | ||
| 95 | |||
| 82 | service apache2 restart | 96 | service apache2 restart |
| 83 | 97 | ||
| 84 | # squid | 98 | # squid |
| @@ -111,6 +125,8 @@ mkdir -p /var/lib/snmp/mib_indexes | |||
| 111 | sed -e 's/^agentaddress.*/agentaddress 127.0.0.1/' -i /etc/snmp/snmpd.conf | 125 | sed -e 's/^agentaddress.*/agentaddress 127.0.0.1/' -i /etc/snmp/snmpd.conf |
| 112 | service snmpd start | 126 | service snmpd start |
| 113 | 127 | ||
| 128 | sed 's/^mibs ://' -i /etc/snmp/snmp.conf | ||
| 129 | |||
| 114 | # start cron, will be used by check_nagios | 130 | # start cron, will be used by check_nagios |
| 115 | cron | 131 | cron |
| 116 | 132 | ||
