author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Mon, 31 Jul 2023 01:24:19 +0300 | |
changeset 31 | 461eed8e7463 |
parent 7 | 1a62f2b0517c |
permissions | -rw-r--r-- |
7
1a62f2b0517c
Added gadict/test/2048/blog lighttpd registration recipe.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
1 |
#!/bin/bash |
1a62f2b0517c
Added gadict/test/2048/blog lighttpd registration recipe.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
2 |
|
1a62f2b0517c
Added gadict/test/2048/blog lighttpd registration recipe.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
3 |
apt install rsync |
1a62f2b0517c
Added gadict/test/2048/blog lighttpd registration recipe.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
4 |
|
1a62f2b0517c
Added gadict/test/2048/blog lighttpd registration recipe.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
5 |
d=gadict |
1a62f2b0517c
Added gadict/test/2048/blog lighttpd registration recipe.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
6 |
mkdir -p /srv/www/$d |
1a62f2b0517c
Added gadict/test/2048/blog lighttpd registration recipe.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
7 |
chown user:user /srv/www/$d |
1a62f2b0517c
Added gadict/test/2048/blog lighttpd registration recipe.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
8 |
|
1a62f2b0517c
Added gadict/test/2048/blog lighttpd registration recipe.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
9 |
cat <<EOF >/etc/lighttpd/conf-available/92-$d.conf |
1a62f2b0517c
Added gadict/test/2048/blog lighttpd registration recipe.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
10 |
\$HTTP["host"] == "$d.defun.work" { |
1a62f2b0517c
Added gadict/test/2048/blog lighttpd registration recipe.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
11 |
server.document-root = "/srv/www/$d" |
1a62f2b0517c
Added gadict/test/2048/blog lighttpd registration recipe.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
12 |
} |
1a62f2b0517c
Added gadict/test/2048/blog lighttpd registration recipe.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
13 |
EOF |
1a62f2b0517c
Added gadict/test/2048/blog lighttpd registration recipe.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
14 |
|
1a62f2b0517c
Added gadict/test/2048/blog lighttpd registration recipe.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
15 |
lighttpd-enable-mod $d |
1a62f2b0517c
Added gadict/test/2048/blog lighttpd registration recipe.
Oleksandr Gavenko <gavenkoa@gmail.com>
parents:
diff
changeset
|
16 |
service lighttpd restart |