diff --git a/net/ariang/Makefile b/net/ariang/Makefile index 1a7550466..48ff438cc 100644 --- a/net/ariang/Makefile +++ b/net/ariang/Makefile @@ -61,8 +61,8 @@ endef define Package/ariang-nginx/install $(Package/ariang/install) - $(INSTALL_DIR) $(1)/etc/nginx - $(INSTALL_BIN) ./files/ariang.conf $(1)/etc/nginx/ariang.conf + $(INSTALL_DIR) $(1)/etc/nginx/conf.d/ + $(INSTALL_BIN) ./files/ariang.locations $(1)/etc/nginx/conf.d/ $(INSTALL_DIR) $(1)/etc/uci-defaults $(INSTALL_BIN) ./files/80_ariang-nginx-support $(1)/etc/uci-defaults/80_ariang-nginx-support endef 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.locations similarity index 100% rename from net/ariang/files/ariang.conf rename to net/ariang/files/ariang.locations