local 437 Bytes
Newer Older
Vincent Mazenod's avatar
Vincent Mazenod committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]:-$0}" )/.." && pwd )"

if [[ ! -f "/etc/apache2/sites-available/slides.conf" ]] ; then

  (
  echo "<VirtualHost *:80>"
  echo "DocumentRoot /var/www/html/blog/blog.limos.fr/content/"
  echo "ServerName slides"
  echo "</VirtualHost>"
  ) | sudo tee -a /etc/apache2/sites-available/slides.conf

  sudo a2ensite slides

  echo "127.0.0.1   slides" | sudo tee -a /etc/hosts
fi