Browse Source

Merge pull request #11217 from peter-stadler/ariang-nginx

ariang: rename nginx configuration file
lilik-openwrt-22.03
Rosen Penev 5 years ago
committed by GitHub
parent
commit
24c2fad79a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions
  1. +2
    -2
      net/ariang/Makefile
  2. +5
    -3
      net/ariang/files/80_ariang-nginx-support
  3. +0
    -0
      net/ariang/files/ariang.locations

+ 2
- 2
net/ariang/Makefile View 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


+ 5
- 3
net/ariang/files/80_ariang-nginx-support View 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


net/ariang/files/ariang.conf → net/ariang/files/ariang.locations View File


Loading…
Cancel
Save