author | Oleksandr Gavenko <gavenkoa@gmail.com> |
Thu, 02 May 2024 16:02:45 +0300 | |
changeset 38 | 5c3fb23b9208 |
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=2048 |
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 |