X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=Test%2FxFhem%2Fbin%2Finstall-sysal-stub;fp=Test%2FxFhem%2Fbin%2Finstall-sysal-stub;h=0121c38e2b8ece8691908516304b4f2174811a82;hb=2e6bf55fa5823071406666b27bfc787293e5bcce;hp=0000000000000000000000000000000000000000;hpb=dda762d0649615ed1b5dead11c3b0c164c1fdabb;p=projects.git 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 +