ungleich-learning-circle/kjg/dot-cdist/type/__my_nginx_site/gencode-remote

21 lines
379 B
Plaintext

os=$(cat "$__global/explorer/os")
case "$os" in
devuan)
CONF_DIR=/etc/nginx/sites-enabled
;;
alpine)
CONF_DIR=/etc/nginx/conf.d
;;
*)
echo "OS $os currently not supported" >&2
exit 1
;;
esac
DOMAIN_NAME="$__object_id"
if grep -q "^__file${CONF_DIR}/${DOMAIN_NAME}" "$__messages_in"; then
echo 'service nginx reload'
fi