From 6dc2ca2219101a2f6d67b9b1ac00a97c303b2275 Mon Sep 17 00:00:00 2001 From: Peter Stadler Date: Sun, 2 Feb 2020 19:13:30 +0100 Subject: ariang: rename nginx configuration file This makes the ariang-nginx ready for Nginx using the conf.d directory. Signed-off-by: Peter Stadler --- net/ariang/files/80_ariang-nginx-support | 8 +++++--- net/ariang/files/ariang.conf | 4 ---- net/ariang/files/ariang.locations | 4 ++++ 3 files changed, 9 insertions(+), 7 deletions(-) delete mode 100644 net/ariang/files/ariang.conf create mode 100644 net/ariang/files/ariang.locations (limited to 'net/ariang/files') diff --git a/net/ariang/files/80_ariang-nginx-support b/net/ariang/files/80_ariang-nginx-support index a9762e09b..f3eea690f 100644 --- a/net/ariang/files/80_ariang-nginx-support +++ b/net/ariang/files/80_ariang-nginx-support @@ -1,10 +1,12 @@ #!/bin/sh -if [ -f "/etc/nginx/nginx.conf" ] && [ -f "/etc/nginx/ariang.conf" ]; then +if [ -f "/etc/nginx/nginx.conf" ] && [ -f "/etc/nginx/conf.d/ariang.locations" ]; +then if [ "$( grep 'server_name localhost;' < /etc/nginx/nginx.conf)" ] && - [ ! "$( grep 'include ariang.conf;' < /etc/nginx/nginx.conf)" ]; then - sed -i '/server_name localhost;/a \\t\tinclude ariang.conf;' /etc/nginx/nginx.conf + [ ! "$( grep 'include conf.d/ariang.locations;' < /etc/nginx/nginx.conf)" ]; then + sed -i '/server_name localhost;/\ + a\\tinclude conf.d/ariang.locations;' /etc/nginx/nginx.conf if [ -f /var/run/nginx.pid ]; then /etc/init.d/nginx restart fi diff --git a/net/ariang/files/ariang.conf b/net/ariang/files/ariang.conf deleted file mode 100644 index 28b0a8ada..000000000 --- a/net/ariang/files/ariang.conf +++ /dev/null @@ -1,4 +0,0 @@ -location /ariang { - index index.html; - alias /www/ariang/; -} \ No newline at end of file diff --git a/net/ariang/files/ariang.locations b/net/ariang/files/ariang.locations new file mode 100644 index 000000000..28b0a8ada --- /dev/null +++ b/net/ariang/files/ariang.locations @@ -0,0 +1,4 @@ +location /ariang { + index index.html; + alias /www/ariang/; +} \ No newline at end of file -- cgit v1.2.3