summarylogtreecommitdiffstats
path: root/nginx_append_config.awk
blob: 067ff1f298bca65d8ec9d0e8e9061e2ebd058e82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/awk -f

/^http {/ {
  config_file = "/opt/anki-sync-server/plugins/nginx/config"

	print
	while (getline nextLine && nextLine !~ "^}$") {
		print nextLine
	}

	while ((getline config < config_file)){
		print "\t" config
	}
	close(config)
	print "}"
	next
};

{print}