X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/projects.git/blobdiff_plain/dda762d0649615ed1b5dead11c3b0c164c1fdabb..2e6bf55fa5823071406666b27bfc787293e5bcce:/Test/xFhem/bin/install-sysal-stub diff --git a/Test/xFhem/bin/install-sysal-stub b/Test/xFhem/bin/install-sysal-stub new file mode 100755 index 0000000..0121c38 --- /dev/null +++ b/Test/xFhem/bin/install-sysal-stub @@ -0,0 +1,27 @@ +#!/bin/bash +set -e + +# test if apache-conf already installed +if [ -e /etc/apache2/sites-enabled/sysal_stub.conf ] +then + exit +fi + +mkdir -p /var/test +chmod 777 /var/test + +cwd=$(pwd) +# write apache conf +echo "# Apache conf for sysal stub +Alias /sysal/rest/AlarmInterface/RemoteWatchdog $cwd/bin/sysal-stub.pl + + Require all granted + Options +ExecCGI + AddHandler cgi-script .pl + +" > /etc/apache2/sites-available/sysal_stub.conf +a2ensite sysal_stub +a2enmod cgi + +systemctl restart apache2 +