Browse Source

Merge pull request #6850 from Ansuel/ariangnginx

ariang: add nginx support
lilik-openwrt-22.03
Hannu Nyman 6 years ago
committed by GitHub
parent
commit
d2e615324d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 4 deletions
  1. +10
    -4
      net/ariang/Makefile
  2. +13
    -0
      net/ariang/files/80_ariang-nginx-support
  3. +4
    -0
      net/ariang/files/ariang.conf

+ 10
- 4
net/ariang/Makefile View File

@ -5,9 +5,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/mayswind/AriaNg-DailyBuild PKG_SOURCE_URL:=https://github.com/mayswind/AriaNg-DailyBuild
PKG_SOURCE_DATE:=2018-05-21
PKG_SOURCE_VERSION:=304500c3f042ac5387e4dd5d6ea159999d249314
PKG_MIRROR_HASH:=f5bb5aad024f0916becc8d36832e5d864cd078553c5a719c715a00ecc72af90e
PKG_SOURCE_DATE:=2018-08-11
PKG_SOURCE_VERSION:=237335fd0e14d3614729052d0a44571c6340367e
PKG_MIRROR_HASH:=263131aadc3dd784af1b9f3136910989ed6cb8ad99a89f82f45e41fa0b97db8d
PKG_LICENSE:=MIT PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE PKG_LICENSE_FILES:=LICENSE
@ -59,7 +59,13 @@ define Package/ariang/install
$(1)/www/ariang $(1)/www/ariang
endef endef
Package/ariang-nginx/install = $(Package/ariang/install)
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/uci-defaults
$(INSTALL_BIN) ./files/80_ariang-nginx-support $(1)/etc/uci-defaults/80_ariang-nginx-support
endef
$(eval $(call BuildPackage,ariang)) $(eval $(call BuildPackage,ariang))
$(eval $(call BuildPackage,ariang-nginx)) $(eval $(call BuildPackage,ariang-nginx))

+ 13
- 0
net/ariang/files/80_ariang-nginx-support View File

@ -0,0 +1,13 @@
#!/bin/sh
if [ -f "/etc/nginx/nginx.conf" ] && [ -f "/etc/nginx/ariang.conf" ]; then
if [ ! "$(cat '/etc/nginx/nginx.conf' | grep -q 'server_name localhost;')" ]; then
sed -i '/server_name localhost;/a \\t\tinclude ariang.conf;' /etc/nginx/nginx.conf
if [ -f /var/run/nginx.pid ]; then
/etc/init.d/nginx restart
fi
fi
fi
exit 0

+ 4
- 0
net/ariang/files/ariang.conf View File

@ -0,0 +1,4 @@
location /ariang {
index index.html;
alias /www/ariang/;
}

Loading…
Cancel
Save