From 1176f213145a1d400d01df2190709c6c562c0909 Mon Sep 17 00:00:00 2001 From: samuel Date: Mon, 11 May 2020 12:22:12 +0200 Subject: [PATCH] gencode --- sami/my-cdist/.cdist/type/__nginx/manifest | 1 + sami/my-cdist/.cdist/type/__nginx/singleton | 0 .../.cdist/type/__nginx_site/gencode-remote | 3 +++ .../.cdist/type/__nginx_site/manifest | 21 +++++++++++++++++++ 4 files changed, 25 insertions(+) create mode 100644 sami/my-cdist/.cdist/type/__nginx/manifest create mode 100644 sami/my-cdist/.cdist/type/__nginx/singleton create mode 100644 sami/my-cdist/.cdist/type/__nginx_site/gencode-remote create mode 100644 sami/my-cdist/.cdist/type/__nginx_site/manifest diff --git a/sami/my-cdist/.cdist/type/__nginx/manifest b/sami/my-cdist/.cdist/type/__nginx/manifest new file mode 100644 index 0000000..f9b246e --- /dev/null +++ b/sami/my-cdist/.cdist/type/__nginx/manifest @@ -0,0 +1 @@ +__package nginx --state present diff --git a/sami/my-cdist/.cdist/type/__nginx/singleton b/sami/my-cdist/.cdist/type/__nginx/singleton new file mode 100644 index 0000000..e69de29 diff --git a/sami/my-cdist/.cdist/type/__nginx_site/gencode-remote b/sami/my-cdist/.cdist/type/__nginx_site/gencode-remote new file mode 100644 index 0000000..2c5a080 --- /dev/null +++ b/sami/my-cdist/.cdist/type/__nginx_site/gencode-remote @@ -0,0 +1,3 @@ +# Reacting on message + +echo "service nginx reload" diff --git a/sami/my-cdist/.cdist/type/__nginx_site/manifest b/sami/my-cdist/.cdist/type/__nginx_site/manifest new file mode 100644 index 0000000..3fa56dc --- /dev/null +++ b/sami/my-cdist/.cdist/type/__nginx_site/manifest @@ -0,0 +1,21 @@ + +os=$(cat "$__global/explorer/os") + +domain="$__object_id" +nginx_config_dir="/etc/nginx/conf.d" + +require="__package/nginx" __file $nginx_config_dir/$domain.conf --source - << EOF + +server { + + server_name $domain; + listen [::]:80 ; + + location / { + autoindex on; + root /var/www/html/$domain; + } +} +EOF + +