packages/net/ariang/files/80_ariang-nginx-support
Peter Stadler 6dc2ca2219 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>
2020-02-02 20:19:27 +01:00

17 lines
442 B
Bash

#!/bin/sh
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 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
fi
fi
exit 0