packages/net/ariang/files/80_ariang-nginx-support
Ansuel Smith aad05bff5a
ariang: add nginx support and update
This adds nginx support for ariang webui and update it to latest commit.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2018-08-26 11:59:02 +02:00

13 lines
344 B
Bash

#!/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