Make ngx script only write the config if run directly
parent
316d7b52d8
commit
67c65c4f1b
|
@ -2,11 +2,15 @@
|
|||
|
||||
import ngx from "https://char.lt/ngx/ngx.ts?v=1";
|
||||
|
||||
ngx("server", [
|
||||
export const site = ngx("server", [
|
||||
[
|
||||
"server_name bio.char.lt",
|
||||
...ngx.listen(),
|
||||
...ngx.letsEncrypt("bio.char.lt"),
|
||||
],
|
||||
ngx("location /", ["root /srv/http/bio.char.lt/public"]),
|
||||
]).write("/etc/nginx/http.d/bio-char-lt.conf");
|
||||
]);
|
||||
|
||||
if (import.meta.main) {
|
||||
site.write("/etc/nginx/http.d/bio-char-lt.conf");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue