From: Michael Wagner Date: Tue, 25 Feb 2020 02:01:38 +0000 (+0100) Subject: epic-ukulele X-Git-Tag: xfhem_0.1-1 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=b284e1e06c9135525c411dd23888acdff314a596;p=xhome.git epic-ukulele --- diff --git a/TestXfhem/FitnessePages/AaaPrepare/content.txt b/TestXfhem/FitnessePages/AaaPrepare/content.txt new file mode 100644 index 0000000..5fa4f14 --- /dev/null +++ b/TestXfhem/FitnessePages/AaaPrepare/content.txt @@ -0,0 +1,4 @@ +Sysal-Stub installieren + +!|test.util.CallScript| +|call script|sudo bin/install-sysal-stub| diff --git a/TestXfhem/FitnessePages/AaaPrepare/properties.xml b/TestXfhem/FitnessePages/AaaPrepare/properties.xml new file mode 100644 index 0000000..3e87512 --- /dev/null +++ b/TestXfhem/FitnessePages/AaaPrepare/properties.xml @@ -0,0 +1,12 @@ + + + true + true + true + true + true + true + + true + true + diff --git a/TestXfhem/bin/install-sysal-stub b/TestXfhem/bin/install-sysal-stub new file mode 100755 index 0000000..26f6b0d --- /dev/null +++ b/TestXfhem/bin/install-sysal-stub @@ -0,0 +1,23 @@ +#!/bin/bash +set -e + +# test if already installed +if [ -e /etc/apache2/sites-enabled/sysal_stub.conf ] +then + exit +fi + +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 + +systemctl restart apache2 + diff --git a/TestXfhem/bin/sysal-stub.pl b/TestXfhem/bin/sysal-stub.pl new file mode 100755 index 0000000..40b0e85 --- /dev/null +++ b/TestXfhem/bin/sysal-stub.pl @@ -0,0 +1,14 @@ +#!/usr/bin/perl -w + +print "Content-type: text/html\n\n"; +print "\n"; + + +open (OUT, ">/tmp/sysal-stub.out"); +while (my $line = ) { + print OUT "$line\n"; + print "$line\n"; +} + +print "\n"; +