snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

entrypoint.sh (516B)


      1 cd /etc/nginx/http.d;
      2 export CRT="${CRT:=nginx-selfsigned.crt}";
      3 if [ -f "/etc/ssl/certs/$CRT" ]
      4 then
      5     # set crt file in the default.conf file
      6     sed -i "/ssl_certificate \//c\\\tssl_certificate \/etc\/ssl\/certs\/$CRT;" default.conf;
      7 fi
      8 export KEY="${KEY:=nginx-selfsigned.key}";
      9 if [ -f "/etc/ssl/private/$KEY" ]
     10 then
     11     # set key file in the default.conf file
     12     sed -i "/ssl_certificate_key \//c\\\tssl_certificate_key \/etc\/ssl\/private\/$KEY;" default.conf;
     13 fi
     14 nginx -g 'daemon off;'; nginx -s reload;
     15