Added cooking + resume sites with generic code.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/deb/lighttpd-register-cooking.bash Sun Mar 19 00:35:34 2023 +0200
@@ -0,0 +1,16 @@
+#!/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 reload
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/deb/lighttpd-register-resume.bash Sun Mar 19 00:35:34 2023 +0200
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+apt install rsync
+
+d=resume
+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 reload
--- a/deb/lighttpd-register-tips.bash Sun Mar 19 00:21:53 2023 +0200
+++ b/deb/lighttpd-register-tips.bash Sun Mar 19 00:35:34 2023 +0200
@@ -1,14 +1,16 @@
#!/bin/bash
-mkdir -p /srv/www/tips
-chown user:user /srv/www/tips
+apt install rsync
-cat <<'EOF' >/etc/lighttpd/conf-available/92-tips.conf
-$HTTP["host"] == "tips.defun.work" {
- server.document-root = "/srv/www/tips/"
+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 tips
+lighttpd-enable-mod $d
service lighttpd reload
-