From b284e1e06c9135525c411dd23888acdff314a596 Mon Sep 17 00:00:00 2001 From: Michael Wagner Date: Tue, 25 Feb 2020 03:01:38 +0100 Subject: [PATCH] epic-ukulele --- .../FitnessePages/AaaPrepare/content.txt | 4 ++++ .../FitnessePages/AaaPrepare/properties.xml | 12 ++++++++++ TestXfhem/bin/install-sysal-stub | 23 +++++++++++++++++++ TestXfhem/bin/sysal-stub.pl | 14 +++++++++++ 4 files changed, 53 insertions(+) create mode 100644 TestXfhem/FitnessePages/AaaPrepare/content.txt create mode 100644 TestXfhem/FitnessePages/AaaPrepare/properties.xml create mode 100755 TestXfhem/bin/install-sysal-stub create mode 100755 TestXfhem/bin/sysal-stub.pl 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"; + -- 2.20.1