1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
#/bin/bash #script to configure apache set -e set -x # If user is not root then exit if [ "$(id -u)" != "0" ]; then echo "Must be run with sudo or by root" exit 77 fi setup_apache() { mkdir -p /srv/mirrors/archive.ubuntu.com echo '<meta http-equiv="refresh" content="0; url=MAAS/">' > /srv/mirrors/archive.ubuntu.com/index.html invoke-rc.d apache2 stop || true invoke-rc.d apache2 start } setup_apache |