#!/bin/bash

apt install rsync

d=welcome
mkdir -p /srv/www/$d
chown user:user /srv/www/$d

cat <<EOF >/etc/lighttpd/conf-available/92-$d.conf
\$HTTP["host"] == "defun.work" {
  server.document-root = "/srv/www/$d"
}
EOF

lighttpd-enable-mod $d
service lighttpd restart
