deb/lighttpd-register-tips.bash
author Oleksandr Gavenko <gavenkoa@gmail.com>
Thu, 02 May 2024 16:02:45 +0300
changeset 38 5c3fb23b9208
parent 6 f92d272095c3
permissions -rw-r--r--
Activate renewal of Let's Encrypt certs in CRON.

#!/bin/bash

apt install rsync

d=tips
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