deb/lighttpd-register-cooking.bash
author Oleksandr Gavenko <gavenkoa@gmail.com>
Sun, 07 May 2023 12:48:30 +0300
changeset 20 f1b38aa4fa52
parent 6 f92d272095c3
permissions -rw-r--r--
Removed tab.

#!/bin/bash

apt install rsync

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

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

lighttpd-enable-mod $d
service lighttpd restart