ariang: rename nginx configuration file
authorPeter Stadler <redacted>
Sun, 2 Feb 2020 18:13:30 +0000 (19:13 +0100)
committerPeter Stadler <redacted>
Sun, 2 Feb 2020 19:19:27 +0000 (20:19 +0100)
This makes the ariang-nginx ready for Nginx using the conf.d directory.

Signed-off-by: Peter Stadler <redacted>
net/ariang/Makefile
net/ariang/files/80_ariang-nginx-support
net/ariang/files/ariang.locations [moved from net/ariang/files/ariang.conf with 100% similarity]

index 1a7550466c9eb9439e5fcf0241f33833ed5f537c..48ff438cc9534c9960c8e4d2040770dfcfe3b447 100644 (file)
@@ -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
index a9762e09bef0ac512bf63bf72d1d9da85a5ce61c..f3eea690f445a56b4191909bfb1cf1f191ca6837 100644 (file)
@@ -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
git clone https://git.99rst.org/PROJECT