ariang: rename nginx configuration file
This makes the ariang-nginx ready for Nginx using the conf.d directory. Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at>
This commit is contained in:
parent
696f5565f8
commit
6dc2ca2219
3 changed files with 7 additions and 5 deletions
|
@ -61,8 +61,8 @@ endef
|
||||||
|
|
||||||
define Package/ariang-nginx/install
|
define Package/ariang-nginx/install
|
||||||
$(Package/ariang/install)
|
$(Package/ariang/install)
|
||||||
$(INSTALL_DIR) $(1)/etc/nginx
|
$(INSTALL_DIR) $(1)/etc/nginx/conf.d/
|
||||||
$(INSTALL_BIN) ./files/ariang.conf $(1)/etc/nginx/ariang.conf
|
$(INSTALL_BIN) ./files/ariang.locations $(1)/etc/nginx/conf.d/
|
||||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||||
$(INSTALL_BIN) ./files/80_ariang-nginx-support $(1)/etc/uci-defaults/80_ariang-nginx-support
|
$(INSTALL_BIN) ./files/80_ariang-nginx-support $(1)/etc/uci-defaults/80_ariang-nginx-support
|
||||||
endef
|
endef
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
#!/bin/sh
|
#!/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)" ] &&
|
if [ "$( grep 'server_name localhost;' < /etc/nginx/nginx.conf)" ] &&
|
||||||
[ ! "$( grep 'include ariang.conf;' < /etc/nginx/nginx.conf)" ]; then
|
[ ! "$( grep 'include conf.d/ariang.locations;' < /etc/nginx/nginx.conf)" ]; then
|
||||||
sed -i '/server_name localhost;/a \\t\tinclude ariang.conf;' /etc/nginx/nginx.conf
|
sed -i '/server_name localhost;/\
|
||||||
|
a\\tinclude conf.d/ariang.locations;' /etc/nginx/nginx.conf
|
||||||
if [ -f /var/run/nginx.pid ]; then
|
if [ -f /var/run/nginx.pid ]; then
|
||||||
/etc/init.d/nginx restart
|
/etc/init.d/nginx restart
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue